pub struct BufferKind { /* private fields */ }Expand description
Interned content-kind tag. Two kinds are equal when their slug
string matches (case-sensitive). Construction via
BufferKind::new is cheap — the registry de-duplicates
identical slugs to a single Arc<str>.
Implementations§
Source§impl BufferKind
impl BufferKind
Sourcepub fn new(slug: impl Into<String>) -> Self
pub fn new(slug: impl Into<String>) -> Self
Construct (or reuse) a kind from a slug. Registers the kind
in the global BufferKindRegistry so observability tooling
can enumerate every kind currently in use.
pub fn raw() -> Self
pub fn pcm16() -> Self
pub fn mulaw8() -> Self
pub fn wav() -> Self
pub fn mp3() -> Self
pub fn opus() -> Self
pub fn jpeg() -> Self
pub fn png() -> Self
pub fn webp() -> Self
pub fn mp4() -> Self
pub fn webm() -> Self
pub fn pdf() -> Self
pub fn json() -> Self
pub fn csv() -> Self
Trait Implementations§
Source§impl Clone for BufferKind
impl Clone for BufferKind
Source§fn clone(&self) -> BufferKind
fn clone(&self) -> BufferKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BufferKind
impl Debug for BufferKind
Source§impl Display for BufferKind
impl Display for BufferKind
impl Eq for BufferKind
Source§impl Hash for BufferKind
impl Hash for BufferKind
Source§impl Ord for BufferKind
impl Ord for BufferKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BufferKind
impl PartialEq for BufferKind
Auto Trait Implementations§
impl Freeze for BufferKind
impl RefUnwindSafe for BufferKind
impl Send for BufferKind
impl Sync for BufferKind
impl Unpin for BufferKind
impl UnsafeUnpin for BufferKind
impl UnwindSafe for BufferKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more