nvme::ds::controller::properties::config

Struct ControllerConfig

source
pub struct ControllerConfig { /* private fields */ }

Implementations§

source§

impl ControllerConfig

source

pub const fn new() -> Self

Returns an instance with zero initialized data.

source§

impl ControllerConfig

source

pub const fn into_bytes(self) -> [u8; 4]

Returns the underlying bits.

§Layout

The returned byte array is layed out in the same way as described here.

source

pub const fn from_bytes(bytes: [u8; 4]) -> Self

Converts the given bytes directly into the bitfield struct.

source§

impl ControllerConfig

source

pub fn enable(&self) -> <bool as Specifier>::InOut

Returns the value of enable.

source

pub fn enable_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>

Returns the value of enable.

#Errors

If the returned value contains an invalid bit pattern for enable.

source

pub fn with_enable(self, new_val: <bool as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of enable set to the given value.

#Panics

If the given value is out of bounds for enable.

source

pub fn with_enable_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of enable set to the given value.

#Errors

If the given value is out of bounds for enable.

source

pub fn set_enable(&mut self, new_val: <bool as Specifier>::InOut)

Sets the value of enable to the given value.

#Panics

If the given value is out of bounds for enable.

source

pub fn set_enable_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of enable to the given value.

#Errors

If the given value is out of bounds for enable.

source

pub fn io_command_set_selected(&self) -> <IOCommandSet as Specifier>::InOut

Returns the value of io_command_set_selected.

source

pub fn io_command_set_selected_or_err( &self, ) -> Result<<IOCommandSet as Specifier>::InOut, InvalidBitPattern<<IOCommandSet as Specifier>::Bytes>>

Returns the value of io_command_set_selected.

#Errors

If the returned value contains an invalid bit pattern for io_command_set_selected.

source

pub fn with_io_command_set_selected( self, new_val: <IOCommandSet as Specifier>::InOut, ) -> Self

Returns a copy of the bitfield with the value of io_command_set_selected set to the given value.

#Panics

If the given value is out of bounds for io_command_set_selected.

source

pub fn with_io_command_set_selected_checked( self, new_val: <IOCommandSet as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of io_command_set_selected set to the given value.

#Errors

If the given value is out of bounds for io_command_set_selected.

source

pub fn set_io_command_set_selected( &mut self, new_val: <IOCommandSet as Specifier>::InOut, )

Sets the value of io_command_set_selected to the given value.

#Panics

If the given value is out of bounds for io_command_set_selected.

source

pub fn set_io_command_set_selected_checked( &mut self, new_val: <IOCommandSet as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of io_command_set_selected to the given value.

#Errors

If the given value is out of bounds for io_command_set_selected.

source

pub fn mem_page_size(&self) -> <B4 as Specifier>::InOut

Returns the value of mem_page_size.

source

pub fn mem_page_size_or_err( &self, ) -> Result<<B4 as Specifier>::InOut, InvalidBitPattern<<B4 as Specifier>::Bytes>>

Returns the value of mem_page_size.

#Errors

If the returned value contains an invalid bit pattern for mem_page_size.

source

pub fn with_mem_page_size(self, new_val: <B4 as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of mem_page_size set to the given value.

#Panics

If the given value is out of bounds for mem_page_size.

source

pub fn with_mem_page_size_checked( self, new_val: <B4 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of mem_page_size set to the given value.

#Errors

If the given value is out of bounds for mem_page_size.

source

pub fn set_mem_page_size(&mut self, new_val: <B4 as Specifier>::InOut)

Sets the value of mem_page_size to the given value.

#Panics

If the given value is out of bounds for mem_page_size.

source

pub fn set_mem_page_size_checked( &mut self, new_val: <B4 as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of mem_page_size to the given value.

#Errors

If the given value is out of bounds for mem_page_size.

source

pub fn arbitration_mechanism( &self, ) -> <ArbitrationMechanism as Specifier>::InOut

Returns the value of arbitration_mechanism.

source

pub fn arbitration_mechanism_or_err( &self, ) -> Result<<ArbitrationMechanism as Specifier>::InOut, InvalidBitPattern<<ArbitrationMechanism as Specifier>::Bytes>>

Returns the value of arbitration_mechanism.

#Errors

If the returned value contains an invalid bit pattern for arbitration_mechanism.

source

pub fn with_arbitration_mechanism( self, new_val: <ArbitrationMechanism as Specifier>::InOut, ) -> Self

Returns a copy of the bitfield with the value of arbitration_mechanism set to the given value.

#Panics

If the given value is out of bounds for arbitration_mechanism.

source

pub fn with_arbitration_mechanism_checked( self, new_val: <ArbitrationMechanism as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of arbitration_mechanism set to the given value.

#Errors

If the given value is out of bounds for arbitration_mechanism.

source

pub fn set_arbitration_mechanism( &mut self, new_val: <ArbitrationMechanism as Specifier>::InOut, )

Sets the value of arbitration_mechanism to the given value.

#Panics

If the given value is out of bounds for arbitration_mechanism.

source

pub fn set_arbitration_mechanism_checked( &mut self, new_val: <ArbitrationMechanism as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of arbitration_mechanism to the given value.

#Errors

If the given value is out of bounds for arbitration_mechanism.

source

pub fn shutdown_notification( &self, ) -> <ShutdownNotification as Specifier>::InOut

Returns the value of shutdown_notification.

source

pub fn shutdown_notification_or_err( &self, ) -> Result<<ShutdownNotification as Specifier>::InOut, InvalidBitPattern<<ShutdownNotification as Specifier>::Bytes>>

Returns the value of shutdown_notification.

#Errors

If the returned value contains an invalid bit pattern for shutdown_notification.

source

pub fn with_shutdown_notification( self, new_val: <ShutdownNotification as Specifier>::InOut, ) -> Self

Returns a copy of the bitfield with the value of shutdown_notification set to the given value.

#Panics

If the given value is out of bounds for shutdown_notification.

source

pub fn with_shutdown_notification_checked( self, new_val: <ShutdownNotification as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of shutdown_notification set to the given value.

#Errors

If the given value is out of bounds for shutdown_notification.

source

pub fn set_shutdown_notification( &mut self, new_val: <ShutdownNotification as Specifier>::InOut, )

Sets the value of shutdown_notification to the given value.

#Panics

If the given value is out of bounds for shutdown_notification.

source

pub fn set_shutdown_notification_checked( &mut self, new_val: <ShutdownNotification as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of shutdown_notification to the given value.

#Errors

If the given value is out of bounds for shutdown_notification.

source

pub fn io_submission_queue_entry_size(&self) -> <B4 as Specifier>::InOut

Returns the value of io_submission_queue_entry_size.

source

pub fn io_submission_queue_entry_size_or_err( &self, ) -> Result<<B4 as Specifier>::InOut, InvalidBitPattern<<B4 as Specifier>::Bytes>>

Returns the value of io_submission_queue_entry_size.

#Errors

If the returned value contains an invalid bit pattern for io_submission_queue_entry_size.

source

pub fn with_io_submission_queue_entry_size( self, new_val: <B4 as Specifier>::InOut, ) -> Self

Returns a copy of the bitfield with the value of io_submission_queue_entry_size set to the given value.

#Panics

If the given value is out of bounds for io_submission_queue_entry_size.

source

pub fn with_io_submission_queue_entry_size_checked( self, new_val: <B4 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of io_submission_queue_entry_size set to the given value.

#Errors

If the given value is out of bounds for io_submission_queue_entry_size.

source

pub fn set_io_submission_queue_entry_size( &mut self, new_val: <B4 as Specifier>::InOut, )

Sets the value of io_submission_queue_entry_size to the given value.

#Panics

If the given value is out of bounds for io_submission_queue_entry_size.

source

pub fn set_io_submission_queue_entry_size_checked( &mut self, new_val: <B4 as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of io_submission_queue_entry_size to the given value.

#Errors

If the given value is out of bounds for io_submission_queue_entry_size.

source

pub fn io_completion_queue_entry_size(&self) -> <B4 as Specifier>::InOut

Returns the value of io_completion_queue_entry_size.

source

pub fn io_completion_queue_entry_size_or_err( &self, ) -> Result<<B4 as Specifier>::InOut, InvalidBitPattern<<B4 as Specifier>::Bytes>>

Returns the value of io_completion_queue_entry_size.

#Errors

If the returned value contains an invalid bit pattern for io_completion_queue_entry_size.

source

pub fn with_io_completion_queue_entry_size( self, new_val: <B4 as Specifier>::InOut, ) -> Self

Returns a copy of the bitfield with the value of io_completion_queue_entry_size set to the given value.

#Panics

If the given value is out of bounds for io_completion_queue_entry_size.

source

pub fn with_io_completion_queue_entry_size_checked( self, new_val: <B4 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of io_completion_queue_entry_size set to the given value.

#Errors

If the given value is out of bounds for io_completion_queue_entry_size.

source

pub fn set_io_completion_queue_entry_size( &mut self, new_val: <B4 as Specifier>::InOut, )

Sets the value of io_completion_queue_entry_size to the given value.

#Panics

If the given value is out of bounds for io_completion_queue_entry_size.

source

pub fn set_io_completion_queue_entry_size_checked( &mut self, new_val: <B4 as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of io_completion_queue_entry_size to the given value.

#Errors

If the given value is out of bounds for io_completion_queue_entry_size.

source

pub fn controller_ready_independent_of_media_enable( &self, ) -> <bool as Specifier>::InOut

Returns the value of controller_ready_independent_of_media_enable.

source

pub fn controller_ready_independent_of_media_enable_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>

Returns the value of controller_ready_independent_of_media_enable.

#Errors

If the returned value contains an invalid bit pattern for controller_ready_independent_of_media_enable.

source

pub fn with_controller_ready_independent_of_media_enable( self, new_val: <bool as Specifier>::InOut, ) -> Self

Returns a copy of the bitfield with the value of controller_ready_independent_of_media_enable set to the given value.

#Panics

If the given value is out of bounds for controller_ready_independent_of_media_enable.

source

pub fn with_controller_ready_independent_of_media_enable_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of controller_ready_independent_of_media_enable set to the given value.

#Errors

If the given value is out of bounds for controller_ready_independent_of_media_enable.

source

pub fn set_controller_ready_independent_of_media_enable( &mut self, new_val: <bool as Specifier>::InOut, )

Sets the value of controller_ready_independent_of_media_enable to the given value.

#Panics

If the given value is out of bounds for controller_ready_independent_of_media_enable.

source

pub fn set_controller_ready_independent_of_media_enable_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of controller_ready_independent_of_media_enable to the given value.

#Errors

If the given value is out of bounds for controller_ready_independent_of_media_enable.

Trait Implementations§

source§

impl CheckFillsUnalignedBits for ControllerConfig

source§

impl Clone for ControllerConfig

source§

fn clone(&self) -> ControllerConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl From<ControllerConfig> for u32
where [(); 32]: IsU32Compatible,

source§

fn from(__bf_bitfield: ControllerConfig) -> Self

Converts to this type from the input type.
source§

impl From<u32> for ControllerConfig
where [(); 32]: IsU32Compatible,

source§

fn from(__bf_prim: u32) -> Self

Converts to this type from the input type.
source§

impl Copy for ControllerConfig

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.