Skip to main content

SimpleEncoder

Struct SimpleEncoder 

Source
pub struct SimpleEncoder<T> { /* private fields */ }
Expand description

This type represents the simple encoder, it wraps a EncoderCallback to delegate the encoding work to it.

Implementations§

Source§

impl<T: EncoderCallback> SimpleEncoder<T>

Source

pub fn with_config( encoder: T, config: &SimpleEncoderConfig, ) -> Result<Self, EspError>

Constructs a new simple encoder with the given callback and configuration.

Trait Implementations§

Source§

impl<T: Debug> Debug for SimpleEncoder<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Drop for SimpleEncoder<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<T: EncoderCallback> RawEncoder for SimpleEncoder<T>

Source§

type Item = <T as EncoderCallback>::Item

The type of input data the encoder can encode.
Source§

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

Returns a mutable reference to the underlying rmt_encoder_t. Read more
Source§

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

Reset the encoder state. Read more

Auto Trait Implementations§

§

impl<T> Freeze for SimpleEncoder<T>

§

impl<T> RefUnwindSafe for SimpleEncoder<T>
where T: RefUnwindSafe,

§

impl<T> !Send for SimpleEncoder<T>

§

impl<T> !Sync for SimpleEncoder<T>

§

impl<T> Unpin for SimpleEncoder<T>

§

impl<T> UnsafeUnpin for SimpleEncoder<T>

§

impl<T> UnwindSafe for SimpleEncoder<T>
where T: UnwindSafe,

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<E> Encoder for E
where E: RawEncoder,

Source§

type Item = <E as RawEncoder>::Item

The type of input data the encoder can encode.
Source§

fn encode( &mut self, handle: &mut RmtChannelHandle, primary_data: &[<E as Encoder>::Item], ) -> (usize, EncoderState)

Encode the user data into RMT symbols and write into RMT memory. Read more
Source§

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

Reset encoding state. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.