[−][src]Struct os_units::Bytes
A struct representing byte size.
Implementations
impl Bytes
[src]
pub const fn new(bytes: usize) -> Self
[src]
Creates a new instance with given value.
pub const fn as_usize(self) -> usize
[src]
Returns the value.
pub const fn as_num_of_pages<T: PageSize>(self) -> NumOfPages<T>
[src]
Converts bytes to the number of physical pages. Note that the number of physical pages will be calculated so that the specified bytes will be fit in pages.
Trait Implementations
impl Add<Bytes> for Bytes
[src]
type Output = Bytes
The resulting type after applying the +
operator.
fn add(self, rhs: Bytes) -> Self
[src]
impl AddAssign<Bytes> for Bytes
[src]
fn add_assign(&mut self, rhs: Bytes)
[src]
impl Clone for Bytes
[src]
fn clone(&self) -> Bytes
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Bytes
[src]
impl Debug for Bytes
[src]
impl Div<usize> for Bytes
[src]
type Output = Bytes
The resulting type after applying the /
operator.
fn div(self, rhs: usize) -> Self::Output
[src]
impl DivAssign<usize> for Bytes
[src]
fn div_assign(&mut self, rhs: usize)
[src]
impl Eq for Bytes
[src]
impl Mul<Bytes> for Bytes
[src]
type Output = Bytes
The resulting type after applying the *
operator.
fn mul(self, rhs: Bytes) -> Self::Output
[src]
impl Mul<usize> for Bytes
[src]
type Output = Bytes
The resulting type after applying the *
operator.
fn mul(self, rhs: usize) -> Self::Output
[src]
impl MulAssign<Bytes> for Bytes
[src]
fn mul_assign(&mut self, rhs: Bytes)
[src]
impl MulAssign<usize> for Bytes
[src]
fn mul_assign(&mut self, rhs: usize)
[src]
impl Ord for Bytes
[src]
fn cmp(&self, other: &Bytes) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Bytes> for Bytes
[src]
impl PartialOrd<Bytes> for Bytes
[src]
fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>
[src]
fn lt(&self, other: &Bytes) -> bool
[src]
fn le(&self, other: &Bytes) -> bool
[src]
fn gt(&self, other: &Bytes) -> bool
[src]
fn ge(&self, other: &Bytes) -> bool
[src]
impl StructuralEq for Bytes
[src]
impl StructuralPartialEq for Bytes
[src]
impl Sub<Bytes> for Bytes
[src]
type Output = Bytes
The resulting type after applying the -
operator.
fn sub(self, rhs: Bytes) -> Self
[src]
impl SubAssign<Bytes> for Bytes
[src]
fn sub_assign(&mut self, rhs: Bytes)
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,