virtio_drivers::device::blk

Struct BlkResp

Source
#[repr(C)]
pub struct BlkResp { /* private fields */ }
Expand description

Response of a VirtIOBlk request.

Implementations§

Source§

impl BlkResp

Source

pub fn status(&self) -> RespStatus

Return the status of a VirtIOBlk request.

Trait Implementations§

Source§

impl AsBytes for BlkResp
where RespStatus: AsBytes, HasPadding<BlkResp, { _ }>: ShouldBe<false>,

Source§

fn as_bytes(&self) -> &[u8]

Gets the bytes of this value. Read more
Source§

fn as_bytes_mut(&mut self) -> &mut [u8]
where Self: FromBytes,

Gets the bytes of this value mutably. Read more
Source§

fn write_to(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to bytes. Read more
Source§

fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the prefix of bytes. Read more
Source§

fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the suffix of bytes. Read more
Source§

impl Debug for BlkResp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BlkResp

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl FromBytes for BlkResp

Source§

fn ref_from(bytes: &[u8]) -> Option<&Self>
where Self: Sized,

Interprets the given bytes as a &Self without copying. Read more
Source§

fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
where Self: Sized,

Interprets the prefix of the given bytes as a &Self without copying. Read more
Source§

fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
where Self: Sized,

Interprets the suffix of the given bytes as a &Self without copying. Read more
Source§

fn mut_from(bytes: &mut [u8]) -> Option<&mut Self>
where Self: Sized + AsBytes,

Interprets the given bytes as a &mut Self without copying. Read more
Source§

fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>
where Self: Sized + AsBytes,

Interprets the prefix of the given bytes as a &mut Self without copying. Read more
Source§

fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>
where Self: Sized + AsBytes,

Interprets the suffix of the given bytes as a &mut Self without copying. Read more
Source§

fn slice_from(bytes: &[u8]) -> Option<&[Self]>
where Self: Sized,

Interprets the given bytes as a &[Self] without copying. Read more
Source§

fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
where Self: Sized,

Interprets the prefix of the given bytes as a &[Self] with length equal to count without copying. Read more
Source§

fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
where Self: Sized,

Interprets the suffix of the given bytes as a &[Self] with length equal to count without copying. Read more
Source§

fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>
where Self: Sized + AsBytes,

Interprets the given bytes as a &mut [Self] without copying. Read more
Source§

fn mut_slice_from_prefix( bytes: &mut [u8], count: usize, ) -> Option<(&mut [Self], &mut [u8])>
where Self: Sized + AsBytes,

Interprets the prefix of the given bytes as a &mut [Self] with length equal to count without copying. Read more
Source§

fn mut_slice_from_suffix( bytes: &mut [u8], count: usize, ) -> Option<(&mut [u8], &mut [Self])>
where Self: Sized + AsBytes,

Interprets the suffix of the given bytes as a &mut [Self] with length equal to count without copying. Read more
Source§

fn read_from(bytes: &[u8]) -> Option<Self>
where Self: Sized,

Reads a copy of Self from bytes. Read more
Source§

fn read_from_prefix(bytes: &[u8]) -> Option<Self>
where Self: Sized,

Reads a copy of Self from the prefix of bytes. Read more
Source§

fn read_from_suffix(bytes: &[u8]) -> Option<Self>
where Self: Sized,

Reads a copy of Self from the suffix of bytes. Read more
Source§

impl FromZeroes for BlkResp

Source§

fn zero(&mut self)

Overwrites self with zeroes. Read more
Source§

fn new_zeroed() -> Self
where Self: Sized,

Creates an instance of Self from zeroed bytes. Read more
Source§

fn new_box_zeroed() -> Box<Self>
where Self: Sized,

Creates a Box<Self> from zeroed bytes. Read more
Source§

fn new_box_slice_zeroed(len: usize) -> Box<[Self]>
where Self: Sized,

Creates a Box<[Self]> (a boxed slice) from zeroed bytes. Read more
Source§

fn new_vec_zeroed(len: usize) -> Vec<Self>
where Self: Sized,

Creates a Vec<Self> from zeroed bytes. Read more

Auto Trait Implementations§

§

impl Freeze for BlkResp

§

impl RefUnwindSafe for BlkResp

§

impl Send for BlkResp

§

impl Sync for BlkResp

§

impl Unpin for BlkResp

§

impl UnwindSafe for BlkResp

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.