pub struct u24(_);
Implementations
sourceimpl u24
impl u24
sourcepub fn new_truncated(value: u32) -> Self
pub fn new_truncated(value: u32) -> Self
Truncate the storage value into the allowed range
Trait Implementations
sourceimpl<'a> DecoderValue<'a> for u24
impl<'a> DecoderValue<'a> for u24
fn decode(buffer: DecoderBuffer<'a>) -> DecoderBufferResult<'a, Self>
sourceimpl<'a> DecoderValueMut<'a> for u24
impl<'a> DecoderValueMut<'a> for u24
fn decode_mut(buffer: DecoderBufferMut<'a>) -> DecoderBufferMutResult<'a, Self>
sourceimpl EncoderValue for u24
impl EncoderValue for u24
sourcefn encoding_size(&self) -> usize
fn encoding_size(&self) -> usize
Returns the encoding size with no buffer constrains
sourcefn encoding_size_for_encoder<E: Encoder>(&self, _encoder: &E) -> usize
fn encoding_size_for_encoder<E: Encoder>(&self, _encoder: &E) -> usize
Returns the encoding size for the given encoder’s capacity
sourcefn encode_mut<E: Encoder>(&mut self, encoder: &mut E)
fn encode_mut<E: Encoder>(&mut self, encoder: &mut E)
Encodes the value into the encoder, while potentially mutating the value itself
sourcefn encode_with_len_prefix<Len: TryFrom<usize> + EncoderValue, E: Encoder>(
&self,
encoder: &mut E
) where
Self: Sized,
Len::Error: Debug,
fn encode_with_len_prefix<Len: TryFrom<usize> + EncoderValue, E: Encoder>(
&self,
encoder: &mut E
) where
Self: Sized,
Len::Error: Debug,
Encodes the value into the encoder with a prefix of Len
sourceimpl Ord for u24
impl Ord for u24
sourceimpl PartialOrd<u24> for u24
impl PartialOrd<u24> for u24
sourcefn partial_cmp(&self, other: &u24) -> Option<Ordering>
fn partial_cmp(&self, other: &u24) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for u24
impl Eq for u24
impl StructuralEq for u24
impl StructuralPartialEq for u24
Auto Trait Implementations
impl RefUnwindSafe for u24
impl Send for u24
impl Sync for u24
impl Unpin for u24
impl UnwindSafe for u24
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more