Skip to content

BufferType::SliceData should not take a Vec<u8> as parameter #15

Description

@Gnurou

Taking a Vec here means the client is likely to make an unneeded copy of the input data. Turning this parameter into a &[u8] means adding a lifetime parameter to the whole of BufferType...

Maybe the solution is to use the types of the members directly for Buffer::new, and remove BufferType altogether? This would need a new trait to obtain the (ptr, size) tuple but is probably cleaner.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions