[−][src]Struct os_units::NumOfPages
A struct A struct representing the number of pages.
Implementations
impl<T: PageSize> NumOfPages<T>
[src]
pub const fn new(num_of_pages: 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_bytes(self) -> Bytes
[src]
Converts the number of physical pages to bytes.
Trait Implementations
impl<T: PageSize> Add<NumOfPages<T>> for NumOfPages<T>
[src]
type Output = NumOfPages<T>
The resulting type after applying the +
operator.
fn add(self, rhs: NumOfPages<T>) -> Self
[src]
impl<T: PageSize> AddAssign<NumOfPages<T>> for NumOfPages<T>
[src]
fn add_assign(&mut self, rhs: NumOfPages<T>)
[src]
impl<T: Clone + PageSize> Clone for NumOfPages<T>
[src]
fn clone(&self) -> NumOfPages<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy + PageSize> Copy for NumOfPages<T>
[src]
impl<T: Debug + PageSize> Debug for NumOfPages<T>
[src]
impl<T: PageSize> Div<usize> for NumOfPages<T>
[src]
type Output = NumOfPages<T>
The resulting type after applying the /
operator.
fn div(self, rhs: usize) -> Self::Output
[src]
impl<T: PageSize> DivAssign<usize> for NumOfPages<T>
[src]
fn div_assign(&mut self, rhs: usize)
[src]
impl<T: Eq + PageSize> Eq for NumOfPages<T>
[src]
impl<T: PageSize> Mul<NumOfPages<T>> for NumOfPages<T>
[src]
type Output = NumOfPages<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: NumOfPages<T>) -> Self::Output
[src]
impl<T: PageSize> Mul<usize> for NumOfPages<T>
[src]
type Output = NumOfPages<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: usize) -> Self::Output
[src]
impl<T: PageSize> MulAssign<NumOfPages<T>> for NumOfPages<T>
[src]
fn mul_assign(&mut self, rhs: NumOfPages<T>)
[src]
impl<T: PageSize> MulAssign<usize> for NumOfPages<T>
[src]
fn mul_assign(&mut self, rhs: usize)
[src]
impl<T: Ord + PageSize> Ord for NumOfPages<T>
[src]
fn cmp(&self, other: &NumOfPages<T>) -> 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<T: PartialEq + PageSize> PartialEq<NumOfPages<T>> for NumOfPages<T>
[src]
fn eq(&self, other: &NumOfPages<T>) -> bool
[src]
fn ne(&self, other: &NumOfPages<T>) -> bool
[src]
impl<T: PartialOrd + PageSize> PartialOrd<NumOfPages<T>> for NumOfPages<T>
[src]
fn partial_cmp(&self, other: &NumOfPages<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &NumOfPages<T>) -> bool
[src]
fn le(&self, other: &NumOfPages<T>) -> bool
[src]
fn gt(&self, other: &NumOfPages<T>) -> bool
[src]
fn ge(&self, other: &NumOfPages<T>) -> bool
[src]
impl<T: PageSize> StructuralEq for NumOfPages<T>
[src]
impl<T: PageSize> StructuralPartialEq for NumOfPages<T>
[src]
impl<T: PageSize> Sub<NumOfPages<T>> for NumOfPages<T>
[src]
type Output = NumOfPages<T>
The resulting type after applying the -
operator.
fn sub(self, rhs: NumOfPages<T>) -> Self
[src]
impl<T: PageSize> SubAssign<NumOfPages<T>> for NumOfPages<T>
[src]
fn sub_assign(&mut self, rhs: NumOfPages<T>)
[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>,