Blkio

Struct Blkio 

Source
pub struct Blkio { /* private fields */ }

Implementations§

Source§

impl Blkio

Source

pub fn new(driver_name: &str) -> Result<Blkio>

Source

pub fn state(&self) -> State

Source

pub fn connect(&mut self) -> Result<()>

Source

pub fn start(&mut self) -> Result<BlkioStartOutcome>

Source

pub fn add_queue(&mut self, poll_queue: bool) -> Result<Blkioq>

Source

pub fn get_bool(&self, name: &str) -> Result<bool>

Source

pub fn get_i32(&self, name: &str) -> Result<i32>

Source

pub fn get_str(&self, name: &str) -> Result<String>

Source

pub fn get_u64(&self, name: &str) -> Result<u64>

Source

pub fn set_bool(&mut self, name: &str, value: bool) -> Result<()>

Source

pub fn set_i32(&mut self, name: &str, value: i32) -> Result<()>

Source

pub fn set_str(&mut self, name: &str, value: &str) -> Result<()>

Source

pub fn set_u64(&mut self, name: &str, value: u64) -> Result<()>

Source

pub fn alloc_mem_region(&mut self, len: usize) -> Result<MemoryRegion>

The allocated region is not mapped by this method.

If not freed manually, the region will be freed once the Blkio and all associated Blkioqs are dropped.

Source

pub fn free_mem_region(&mut self, region: &MemoryRegion)

The given region must not be mapped when this method is called.

Source

pub fn map_mem_region(&mut self, region: &MemoryRegion) -> Result<()>

An error is returned if the region is already mapped.

Source

pub fn unmap_mem_region(&mut self, region: &MemoryRegion)

This does nothing if the region is not mapped.

Auto Trait Implementations§

§

impl Freeze for Blkio

§

impl !RefUnwindSafe for Blkio

§

impl Send for Blkio

§

impl Sync for Blkio

§

impl Unpin for Blkio

§

impl !UnwindSafe for Blkio

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.