pub struct NvmeController {
registers: usize,
admin_queue: Mutex<QueuePair>,
io_queue: Mutex<IoQueuePair>,
namespaces: Vec<NvmeNamespace>,
pub name: String,
irq_line: u8,
io_done: Box<[AtomicBool]>,
io_wq: WaitQueue,
}Fields§
§registers: usize§admin_queue: Mutex<QueuePair>§io_queue: Mutex<IoQueuePair>§namespaces: Vec<NvmeNamespace>§name: String§irq_line: u8§io_done: Box<[AtomicBool]>§io_wq: WaitQueueImplementations§
Source§impl NvmeController
impl NvmeController
unsafe fn new(registers: usize, name: String) -> Result<Self, NvmeError>
fn submit_admin_command( &self, command: Command, ) -> Result<CompletionEntry, NvmeError>
fn init_admin_queue(&mut self) -> Result<(), NvmeError>
fn create_io_queues(&mut self) -> Result<(), NvmeError>
fn identify(&self, cns: u8, nsid: u32) -> Result<Vec<u8>, NvmeError>
fn identify_namespaces(&mut self) -> Result<(), NvmeError>
fn submit_io_command(&self, command: &mut Command) -> Result<u16, NvmeError>
pub fn read_blocks( &self, nsid: u32, lba: u64, block_count: u32, buf_phys: u64, ) -> Result<(), NvmeError>
pub fn write_blocks( &self, nsid: u32, lba: u64, block_count: u32, buf_phys: u64, ) -> Result<(), NvmeError>
pub fn handle_interrupt(&self)
pub fn namespace_count(&self) -> usize
pub fn get_namespace(&self, index: usize) -> Option<&NvmeNamespace>
pub fn set_irq_line(&mut self, irq: u8)
pub fn irq_line(&self) -> u8
Trait Implementations§
impl Send for NvmeController
impl Sync for NvmeController
Auto Trait Implementations§
impl !Freeze for NvmeController
impl !RefUnwindSafe for NvmeController
impl Unpin for NvmeController
impl UnsafeUnpin for NvmeController
impl UnwindSafe for NvmeController
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more