pub struct Bytes(/* private fields */);Expand description
A struct representing byte size.
Implementations§
Source§impl Bytes
impl Bytes
Sourcepub fn as_num_of_pages<T: PageSize>(self) -> NumOfPages<T>
pub fn as_num_of_pages<T: PageSize>(self) -> NumOfPages<T>
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§
Source§impl AddAssign<Bytes> for PhysAddr
impl AddAssign<Bytes> for PhysAddr
Source§fn add_assign(&mut self, rhs: Bytes)
fn add_assign(&mut self, rhs: Bytes)
Performs the
+= operation. Read moreSource§impl AddAssign<Bytes> for VirtAddr
impl AddAssign<Bytes> for VirtAddr
Source§fn add_assign(&mut self, rhs: Bytes)
fn add_assign(&mut self, rhs: Bytes)
Performs the
+= operation. Read moreSource§impl AddAssign<usize> for Bytes
impl AddAssign<usize> for Bytes
Source§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+= operation. Read moreSource§impl AddAssign for Bytes
impl AddAssign for Bytes
Source§fn add_assign(&mut self, rhs: Bytes)
fn add_assign(&mut self, rhs: Bytes)
Performs the
+= operation. Read moreSource§impl DivAssign<usize> for Bytes
impl DivAssign<usize> for Bytes
Source§fn div_assign(&mut self, rhs: usize)
fn div_assign(&mut self, rhs: usize)
Performs the
/= operation. Read moreSource§impl MulAssign<usize> for Bytes
impl MulAssign<usize> for Bytes
Source§fn mul_assign(&mut self, rhs: usize)
fn mul_assign(&mut self, rhs: usize)
Performs the
*= operation. Read moreSource§impl Ord for Bytes
impl Ord for Bytes
Source§impl PartialOrd for Bytes
impl PartialOrd for Bytes
Source§impl SubAssign<Bytes> for PhysAddr
impl SubAssign<Bytes> for PhysAddr
Source§fn sub_assign(&mut self, rhs: Bytes)
fn sub_assign(&mut self, rhs: Bytes)
Performs the
-= operation. Read moreSource§impl SubAssign<Bytes> for VirtAddr
impl SubAssign<Bytes> for VirtAddr
Source§fn sub_assign(&mut self, rhs: Bytes)
fn sub_assign(&mut self, rhs: Bytes)
Performs the
-= operation. Read moreSource§impl SubAssign<usize> for Bytes
impl SubAssign<usize> for Bytes
Source§fn sub_assign(&mut self, rhs: usize)
fn sub_assign(&mut self, rhs: usize)
Performs the
-= operation. Read moreSource§impl SubAssign for Bytes
impl SubAssign for Bytes
Source§fn sub_assign(&mut self, rhs: Bytes)
fn sub_assign(&mut self, rhs: Bytes)
Performs the
-= operation. Read moreimpl Copy for Bytes
impl Eq for Bytes
impl StructuralPartialEq for Bytes
Auto Trait Implementations§
impl Freeze for Bytes
impl RefUnwindSafe for Bytes
impl Send for Bytes
impl Sync for Bytes
impl Unpin for Bytes
impl UnwindSafe for Bytes
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