#[repr(transparent)]pub struct MetazoneId(pub TinyAsciiStr<4>);
Expand description
Metazone ID in a compact format
🚧 This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. While the serde representation of data structs is guaranteed
to be stable, their Rust representation might not be. Use with caution.
Tuple Fields§
§0: TinyAsciiStr<4>
Trait Implementations§
Source§impl AsULE for MetazoneId
impl AsULE for MetazoneId
Source§type ULE = MetazoneId
type ULE = MetazoneId
The ULE type corresponding to
Self
. Read moreSource§fn to_unaligned(self) -> <MetazoneId as AsULE>::ULE
fn to_unaligned(self) -> <MetazoneId as AsULE>::ULE
Source§fn from_unaligned(unaligned: <MetazoneId as AsULE>::ULE) -> MetazoneId
fn from_unaligned(unaligned: <MetazoneId as AsULE>::ULE) -> MetazoneId
Source§impl Clone for MetazoneId
impl Clone for MetazoneId
Source§fn clone(&self) -> MetazoneId
fn clone(&self) -> MetazoneId
Returns a copy of the value. Read more
1.0.0 · 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 MetazoneId
impl Debug for MetazoneId
Source§impl From<MetazoneId> for TinyAsciiStr<4>
impl From<MetazoneId> for TinyAsciiStr<4>
Source§fn from(other: MetazoneId) -> TinyAsciiStr<4>
fn from(other: MetazoneId) -> TinyAsciiStr<4>
Converts to this type from the input type.
Source§impl From<TinyAsciiStr<4>> for MetazoneId
impl From<TinyAsciiStr<4>> for MetazoneId
Source§fn from(s: TinyAsciiStr<4>) -> MetazoneId
fn from(s: TinyAsciiStr<4>) -> MetazoneId
Converts to this type from the input type.
Source§impl FromStr for MetazoneId
impl FromStr for MetazoneId
Source§type Err = TinyStrError
type Err = TinyStrError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<MetazoneId, <MetazoneId as FromStr>::Err>
fn from_str(s: &str) -> Result<MetazoneId, <MetazoneId as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moreSource§impl Hash for MetazoneId
impl Hash for MetazoneId
Source§impl Ord for MetazoneId
impl Ord for MetazoneId
Source§fn cmp(&self, other: &MetazoneId) -> Ordering
fn cmp(&self, other: &MetazoneId) -> Ordering
1.21.0 · 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 MetazoneId
impl PartialEq for MetazoneId
Source§impl PartialOrd for MetazoneId
impl PartialOrd for MetazoneId
Source§impl ULE for MetazoneId
impl ULE for MetazoneId
Source§fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
Validates a byte slice,
&[u8]
. Read moreSource§fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
Source§unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]
Takes a byte slice,
&[u8]
, and return it as &[Self]
with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_byte_slice()
with
success. Read moreSource§impl<'a> Yokeable<'a> for MetazoneIdwhere
MetazoneId: Sized,
impl<'a> Yokeable<'a> for MetazoneIdwhere
MetazoneId: Sized,
Source§type Output = MetazoneId
type Output = MetazoneId
This type MUST be
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
Source§fn transform_owned(self) -> <MetazoneId as Yokeable<'a>>::Output
fn transform_owned(self) -> <MetazoneId as Yokeable<'a>>::Output
Source§unsafe fn make(this: <MetazoneId as Yokeable<'a>>::Output) -> MetazoneId
unsafe fn make(this: <MetazoneId as Yokeable<'a>>::Output) -> MetazoneId
This method can be used to cast away
Self<'a>
’s lifetime. Read moreSource§fn transform_mut<F>(&'a mut self, f: F)
fn transform_mut<F>(&'a mut self, f: F)
This method must cast
self
between &'a mut Self<'static>
and &'a mut Self<'a>
,
and pass it to f
. Read moreSource§impl<'a> ZeroMapKV<'a> for MetazoneId
impl<'a> ZeroMapKV<'a> for MetazoneId
Source§type Container = ZeroVec<'a, MetazoneId>
type Container = ZeroVec<'a, MetazoneId>
The container that can be used with this type:
ZeroVec
or VarZeroVec
.type Slice = ZeroSlice<MetazoneId>
Source§type GetType = MetazoneId
type GetType = MetazoneId
The type produced by
Container::get()
Read moreSource§type OwnedType = MetazoneId
type OwnedType = MetazoneId
The type produced by
Container::replace()
and Container::remove()
,
also used during deserialization. If Self
is human readable serialized,
deserializing to Self::OwnedType
should produce the same value once
passed through Self::owned_as_self()
Read moreimpl Copy for MetazoneId
impl Eq for MetazoneId
impl StructuralPartialEq for MetazoneId
Auto Trait Implementations§
impl Freeze for MetazoneId
impl RefUnwindSafe for MetazoneId
impl Send for MetazoneId
impl Sync for MetazoneId
impl Unpin for MetazoneId
impl UnwindSafe for MetazoneId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more