pub enum DataIdent {
Fourcc(Fourcc),
Freeform {
mean: Cow<'static, str>,
name: Cow<'static, str>,
},
}Expand description
The identifier used to store metadata inside an item list.
Either a Fourcc or an freeform identifier.
Variants§
Fourcc(Fourcc)
A standard identifier containing a 4 byte atom identifier.
Freeform
An identifier of a freeform (----) atom containing either owned or static
mean and name strings.
Implementations§
Source§impl DataIdent
impl DataIdent
Sourcepub fn freeform(
mean: impl Into<Cow<'static, str>>,
name: impl Into<Cow<'static, str>>,
) -> Self
pub fn freeform( mean: impl Into<Cow<'static, str>>, name: impl Into<Cow<'static, str>>, ) -> Self
Creates a new identifier of type DataIdent::Freeform containing the owned mean, and
name string.
Sourcepub const fn fourcc(bytes: [u8; 4]) -> Self
pub const fn fourcc(bytes: [u8; 4]) -> Self
Creates a new identifier of type DataIdent::Fourcc containing an atom identifier with
the 4-byte identifier.
Trait Implementations§
Source§impl<'a> From<FreeformIdent<'a, BorrowedStr<'a>>> for DataIdent
impl<'a> From<FreeformIdent<'a, BorrowedStr<'a>>> for DataIdent
Source§fn from(value: FreeformIdent<'a, BorrowedStr<'a>>) -> Self
fn from(value: FreeformIdent<'a, BorrowedStr<'a>>) -> Self
Converts to this type from the input type.
Source§impl From<FreeformIdent<'static, StaticStr<'static>>> for DataIdent
impl From<FreeformIdent<'static, StaticStr<'static>>> for DataIdent
Source§fn from(value: FreeformIdentStatic) -> Self
fn from(value: FreeformIdentStatic) -> Self
Converts to this type from the input type.
Source§impl<'a, T: StrLifetime<'a>> PartialEq<DataIdent> for FreeformIdent<'a, T>
impl<'a, T: StrLifetime<'a>> PartialEq<DataIdent> for FreeformIdent<'a, T>
impl Eq for DataIdent
impl StructuralPartialEq for DataIdent
Auto Trait Implementations§
impl Freeze for DataIdent
impl RefUnwindSafe for DataIdent
impl Send for DataIdent
impl Sync for DataIdent
impl Unpin for DataIdent
impl UnwindSafe for DataIdent
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