StorageCommandObject

Struct StorageCommandObject 

Source
pub struct StorageCommandObject { /* private fields */ }
Expand description

Implements the storage command object (0x1010)

Implementations§

Source§

impl StorageCommandObject

Source

pub const fn new( od: &'static [ODEntry<'static>], storage_context: &'static StorageContext, ) -> Self

Create a new storage context object

Trait Implementations§

Source§

impl ObjectAccess for StorageCommandObject

Source§

fn read( &self, sub: u8, offset: usize, buf: &mut [u8], ) -> Result<usize, AbortCode>

Read raw bytes from a subobject Read more
Source§

fn read_size(&self, sub: u8) -> Result<usize, AbortCode>

Get the number of bytes available for a read
Source§

fn write(&self, sub: u8, data: &[u8]) -> Result<(), AbortCode>

Write raw bytes to a subobject Read more
Source§

fn object_code(&self) -> ObjectCode

Get the type of this object
Source§

fn sub_info(&self, sub: u8) -> Result<SubInfo, AbortCode>

Get metadata about a sub object
Source§

fn begin_partial(&self, sub: u8) -> Result<(), AbortCode>

Initialize a new partial write Read more
Source§

fn write_partial(&self, _sub: u8, _buf: &[u8]) -> Result<(), AbortCode>

Perform a partial write of bytes to a subobject Read more
Source§

fn end_partial(&self, _sub: u8) -> Result<(), AbortCode>

Finalize a previous partial write Read more
Source§

fn max_sub_number(&self) -> u8

Get the highest sub index available in this object
Source§

fn set_event_flag(&self, _sub: u8) -> Result<(), AbortCode>

Set an event flag for the specified sub object on this object Read more
Source§

fn read_event_flag(&self, _sub: u8) -> bool

Read an event flag for the specified sub object Read more
Source§

fn clear_events(&self)

Clear event flags for all sub objects Read more
Source§

fn access_type(&self, sub: u8) -> Result<AccessType, AbortCode>

Get the access type of a specific sub object
Source§

fn data_type(&self, sub: u8) -> Result<DataType, AbortCode>

Get the data type of a specific sub object
Source§

fn size(&self, sub: u8) -> Result<usize, AbortCode>

Get the maximum size of an sub object Read more
Source§

fn current_size(&self, sub: u8) -> Result<usize, AbortCode>

Get the current size of a sub object Read more
Source§

fn read_u32(&self, sub: u8) -> Result<u32, AbortCode>

Read a sub object as a u32
Source§

fn read_u16(&self, sub: u8) -> Result<u16, AbortCode>

Read a sub object as a u16
Source§

fn read_u8(&self, sub: u8) -> Result<u8, AbortCode>

Read a sub object as a u8
Source§

fn read_i32(&self, sub: u8) -> Result<i32, AbortCode>

Read a sub object as an i32
Source§

fn read_i16(&self, sub: u8) -> Result<i16, AbortCode>

Read a sub object as an i16
Source§

fn read_i8(&self, sub: u8) -> Result<i8, AbortCode>

Read a sub object as an i8

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> 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.