[][src]Struct dw1000::ll::RegAccessor

pub struct RegAccessor<'s, R, SPI, CS>(_, _);

Provides access to a register

You can get an instance for a given register using one of the methods on DW1000.

Methods

impl<'s, R, SPI, CS> RegAccessor<'s, R, SPI, CS> where
    SPI: Transfer<u8> + Write<u8>,
    CS: OutputPin
[src]

pub fn read(&mut self) -> Result<R::Read, Error<SPI, CS>> where
    R: Register + Readable
[src]

Read from the register

pub fn write<F>(&mut self, f: F) -> Result<(), Error<SPI, CS>> where
    R: Register + Writable,
    F: FnOnce(&mut R::Write) -> &mut R::Write
[src]

Write to the register

pub fn modify<F>(&mut self, f: F) -> Result<(), Error<SPI, CS>> where
    R: Register + Readable + Writable,
    F: for<'r> FnOnce(&mut R::Read, &'r mut R::Write) -> &'r mut R::Write
[src]

Modify the register

Auto Trait Implementations

impl<'s, R, SPI, CS> Send for RegAccessor<'s, R, SPI, CS> where
    CS: Send,
    R: Send,
    SPI: Send

impl<'s, R, SPI, CS> Sync for RegAccessor<'s, R, SPI, CS> where
    CS: Sync,
    R: Sync,
    SPI: Sync

impl<'s, R, SPI, CS> Unpin for RegAccessor<'s, R, SPI, CS> where
    R: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.