Skip to main content

RawEncoder

Trait RawEncoder 

Source
pub trait RawEncoder {
    type Item;

    // Required method
    fn handle(&mut self) -> &mut rmt_encoder_t;

    // Provided method
    fn reset(&mut self) -> Result<(), EspError> { ... }
}
Expand description

This trait represents an RMT encoder that is used to encode data for transmission.

Required Associated Types§

Source

type Item

The type of input data the encoder can encode.

Required Methods§

Source

fn handle(&mut self) -> &mut rmt_encoder_t

Returns a mutable reference to the underlying rmt_encoder_t.

The functions of the rmt_encoder_t will be called by the RMT driver.

Provided Methods§

Source

fn reset(&mut self) -> Result<(), EspError>

Reset the encoder state.

§Errors

If resetting the encoder fails, it should return an EspError with the code ESP_FAIL.

Implementations on Foreign Types§

Source§

impl<E: RawEncoder> RawEncoder for &mut E

Source§

type Item = <E as RawEncoder>::Item

Source§

fn handle(&mut self) -> &mut rmt_encoder_t

Source§

fn reset(&mut self) -> Result<(), EspError>

Implementors§