kos_sys::os::blockdev

Struct kos_blockdev_t

Source
#[repr(C)]
pub struct kos_blockdev_t { pub dev_data: *mut c_void, pub l_block_size: u32, pub init: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t) -> c_int>, pub shutdown: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t) -> c_int>, pub read_blocks: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t, block: u64, count: c_size_t, buf: *mut c_void) -> c_int>, pub write_blocks: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t, block: u64, count: c_size_t, buf: *const c_void) -> c_int>, pub count_blocks: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t) -> u64>, pub flush: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t) -> c_int>, }

Fields§

§dev_data: *mut c_void§l_block_size: u32§init: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t) -> c_int>§shutdown: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t) -> c_int>§read_blocks: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t, block: u64, count: c_size_t, buf: *mut c_void) -> c_int>§write_blocks: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t, block: u64, count: c_size_t, buf: *const c_void) -> c_int>§count_blocks: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t) -> u64>§flush: Option<unsafe extern "C" fn(d: *mut kos_blockdev_t) -> c_int>

Auto Trait Implementations§

§

impl Freeze for kos_blockdev_t

§

impl RefUnwindSafe for kos_blockdev_t

§

impl !Send for kos_blockdev_t

§

impl !Sync for kos_blockdev_t

§

impl Unpin for kos_blockdev_t

§

impl UnwindSafe for kos_blockdev_t

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.