Skip to main content

PtrIO

Struct PtrIO 

Source
pub struct PtrIO;
Expand description

Default RegisterIO implementation.

Provides infallible register access through volatile pointer reads and writes.

Trait Implementations§

Source§

impl RawRegisterIO for PtrIO

Source§

type Error = Infallible

The error type this register transport returns. For infallible transports (e.g., direct volatile pointer accesses), this should be core::convert::Infallible so that the Reg type can provide an infallible API in addition to the try_* API.
Source§

unsafe fn try_read<T: RegInt>(&self, ptr: *const T) -> Result<T, Self::Error>

Try to read a primitive integer from memory. Read more
Source§

unsafe fn try_write<T: RegInt>( &self, ptr: *mut T, value: T, ) -> Result<(), Self::Error>

Try to write primitive integer to memory Read more

Auto Trait Implementations§

§

impl Freeze for PtrIO

§

impl RefUnwindSafe for PtrIO

§

impl Send for PtrIO

§

impl Sync for PtrIO

§

impl Unpin for PtrIO

§

impl UnsafeUnpin for PtrIO

§

impl UnwindSafe for PtrIO

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> RegisterIO for T
where T: RawRegisterIO,

Source§

type Error = <T as RawRegisterIO>::Error

Source§

unsafe fn try_read_register<R>( &self, ptr: *const <R as Register>::Regwidth, ) -> Result<R, <T as RegisterIO>::Error>
where R: Register, <R as Register>::Access: Read,

Read a register value Read more
Source§

unsafe fn try_write_register<R>( &self, ptr: *mut <R as Register>::Regwidth, value: R, ) -> Result<(), <T as RegisterIO>::Error>
where R: Register, <R as Register>::Access: Write,

Write a register value 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.