pub struct NoCodec {}
Expand description
A codec that represents absense of a codec. This has two main usecases:
Firstly, if this is used as the default codec for a device, it essentially
requires any associated register to explicitly specify a codec. Otherwise
accessing that register via the RegisterInterfaceSync
or RegisterInterfaceAsync
trait will cause a panic.
Secondly, specifying this codec as the default for a register will cause
any reads or writes to that register via the RegisterInterfaceSync
or RegisterInterfaceAsync
traits to be performed
through the default codec of the device.
Trait Implementations§
Source§impl CodecAsync for NoCodec
impl CodecAsync for NoCodec
Source§async fn read_register<R, I, A>(
_bound_bus: &mut I2cBoundBusAsync<I, A>,
) -> Result<R, I::Error>
async fn read_register<R, I, A>( _bound_bus: &mut I2cBoundBusAsync<I, A>, ) -> Result<R, I::Error>
Read this register from the given I2C interface/device.
Source§async fn write_register<R, I, A>(
_bound_bus: &mut I2cBoundBusAsync<I, A>,
_register: impl AsRef<R>,
) -> Result<(), I::Error>
async fn write_register<R, I, A>( _bound_bus: &mut I2cBoundBusAsync<I, A>, _register: impl AsRef<R>, ) -> Result<(), I::Error>
Write this register to the given I2C interface/device.
Source§impl CodecSync for NoCodec
impl CodecSync for NoCodec
Source§fn read_register<R, I, A>(
_bound_bus: &mut I2cBoundBusSync<I, A>,
) -> Result<R, I::Error>
fn read_register<R, I, A>( _bound_bus: &mut I2cBoundBusSync<I, A>, ) -> Result<R, I::Error>
Read this register from the given I2C interface/device.
Source§fn write_register<R, I, A>(
_bound_bus: &mut I2cBoundBusSync<I, A>,
_register: impl AsRef<R>,
) -> Result<(), I::Error>
fn write_register<R, I, A>( _bound_bus: &mut I2cBoundBusSync<I, A>, _register: impl AsRef<R>, ) -> Result<(), I::Error>
Write this register to the given I2C interface/device.
Auto Trait Implementations§
impl Freeze for NoCodec
impl RefUnwindSafe for NoCodec
impl Send for NoCodec
impl Sync for NoCodec
impl Unpin for NoCodec
impl UnwindSafe for NoCodec
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