pub struct u48(_);
Implementations
sourceimpl u48
impl u48
sourcepub fn new_truncated(value: u64) -> Self
pub fn new_truncated(value: u64) -> Self
Truncate the storage value into the allowed range
Trait Implementations
sourceimpl<'a> DecoderValue<'a> for u48
impl<'a> DecoderValue<'a> for u48
fn decode(buffer: DecoderBuffer<'a>) -> DecoderBufferResult<'a, Self>
sourceimpl<'a> DecoderValueMut<'a> for u48
impl<'a> DecoderValueMut<'a> for u48
fn decode_mut(buffer: DecoderBufferMut<'a>) -> DecoderBufferMutResult<'a, Self>
sourceimpl EncoderValue for u48
impl EncoderValue for u48
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 u48
impl Ord for u48
sourceimpl PartialOrd<u48> for u48
impl PartialOrd<u48> for u48
sourcefn partial_cmp(&self, other: &u48) -> Option<Ordering>
fn partial_cmp(&self, other: &u48) -> 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 u48
impl Eq for u48
impl StructuralEq for u48
impl StructuralPartialEq for u48
Auto Trait Implementations
impl RefUnwindSafe for u48
impl Send for u48
impl Sync for u48
impl Unpin for u48
impl UnwindSafe for u48
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