pub struct ByteSize(/* private fields */);
Expand description
An unsigned number of bytes.
Used to represent sizes of values in registers or in memory. Can also be used for other byte-valued numbers, like offsets, as long as the number is guaranteed to be non-negative.
Implementations§
Trait Implementations§
source§impl AddAssign for ByteSize
impl AddAssign for ByteSize
source§fn add_assign(&mut self, rhs: ByteSize)
fn add_assign(&mut self, rhs: ByteSize)
Performs the
+=
operation. Read moresource§impl<'de> Deserialize<'de> for ByteSize
impl<'de> Deserialize<'de> for ByteSize
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<__RhsT> DivAssign<__RhsT> for ByteSize
impl<__RhsT> DivAssign<__RhsT> for ByteSize
source§fn div_assign(&mut self, rhs: __RhsT)
fn div_assign(&mut self, rhs: __RhsT)
Performs the
/=
operation. Read moresource§impl<__RhsT> MulAssign<__RhsT> for ByteSize
impl<__RhsT> MulAssign<__RhsT> for ByteSize
source§fn mul_assign(&mut self, rhs: __RhsT)
fn mul_assign(&mut self, rhs: __RhsT)
Performs the
*=
operation. Read moresource§impl Ord for ByteSize
impl Ord for ByteSize
source§impl PartialEq for ByteSize
impl PartialEq for ByteSize
source§impl PartialOrd for ByteSize
impl PartialOrd for ByteSize
1.0.0 · source§fn 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 moresource§impl<__RhsT> RemAssign<__RhsT> for ByteSize
impl<__RhsT> RemAssign<__RhsT> for ByteSize
source§fn rem_assign(&mut self, rhs: __RhsT)
fn rem_assign(&mut self, rhs: __RhsT)
Performs the
%=
operation. Read moresource§impl<__RhsT> ShlAssign<__RhsT> for ByteSize
impl<__RhsT> ShlAssign<__RhsT> for ByteSize
source§fn shl_assign(&mut self, rhs: __RhsT)
fn shl_assign(&mut self, rhs: __RhsT)
Performs the
<<=
operation. Read moresource§impl<__RhsT> ShrAssign<__RhsT> for ByteSize
impl<__RhsT> ShrAssign<__RhsT> for ByteSize
source§fn shr_assign(&mut self, rhs: __RhsT)
fn shr_assign(&mut self, rhs: __RhsT)
Performs the
>>=
operation. Read moresource§impl SubAssign for ByteSize
impl SubAssign for ByteSize
source§fn sub_assign(&mut self, rhs: ByteSize)
fn sub_assign(&mut self, rhs: ByteSize)
Performs the
-=
operation. Read moreimpl Copy for ByteSize
impl Eq for ByteSize
impl StructuralEq for ByteSize
impl StructuralPartialEq for ByteSize
Auto Trait Implementations§
impl RefUnwindSafe for ByteSize
impl Send for ByteSize
impl Sync for ByteSize
impl Unpin for ByteSize
impl UnwindSafe for ByteSize
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.