Skip to content

Implement Buf and BufMut directly on wrapped dynamic types instead of providing wrappers? #31

Description

@udoprog

Two libraries I'm using quite frequently are bstr, and bytes (who's naming convention is borrowed here), and one of their decisions is to implement an [extension trait directly on types instead of solely requiring a wrapper like the wrap module:

This is an option worth exploring for the audio crate, and maybe one to seriously consider. Because it would preempt questions such as the need to export the wrap module from crates, making it easier to use primitive Rust types directly meaning users might not even need to depend on the audio crate to use the library. Unless they have a specific reason like using audio crate-specific buffers.

CC: @Be-ing

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

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions