#[repr(u16)]pub enum Count {
Bytes(u16),
Blocks(u16),
Infinite,
}
Expand description
Represents the byte/block count
field of the Argument.
Variants§
Bytes(u16)
Represents the bytes transferred.
Blocks(u16)
Represents the blocks transferred.
Infinite
Represents an infinite number of blocks transferred until an I/O abort
is sent.
Implementations§
Source§impl Count
impl Count
Sourcepub const MAX: u16 = 511u16
pub const MAX: u16 = 511u16
Represents the maximal count value (other than special value assigned to zero).
Sourcepub const MAX_BYTES: u16 = 512u16
pub const MAX_BYTES: u16 = 512u16
Represents the maximum byte count indicated by zero in the raw value.
Sourcepub const fn from_parts(mode: BlockMode, val: u16) -> Result<Self>
pub const fn from_parts(mode: BlockMode, val: u16) -> Result<Self>
Attempts to convert component parts into a Count.
Sourcepub const fn from_parts_unchecked(mode: BlockMode, val: u16) -> Self
pub const fn from_parts_unchecked(mode: BlockMode, val: u16) -> Self
Sourcepub const fn into_parts(self) -> (BlockMode, u16)
pub const fn into_parts(self) -> (BlockMode, u16)
Converts the Count into component parts.
Trait Implementations§
impl Copy for Count
impl Eq for Count
impl StructuralPartialEq for Count
Auto Trait Implementations§
impl Freeze for Count
impl RefUnwindSafe for Count
impl Send for Count
impl Sync for Count
impl Unpin for Count
impl UnwindSafe for Count
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