EncoderBuilder

Trait EncoderBuilder 

Source
pub trait EncoderBuilder: MemoryBounds {
    // Required methods
    fn input_event_type(&self) -> EventType;
    fn output_payload_type(&self) -> PayloadType;
    fn build<'life0, 'async_trait>(
        &'life0 self,
        context: ComponentContext,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Encoder + Send>, GenericError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A encoder builder.

Encoder builders are responsible for creating instances of Encoders, as well as describing high-level aspects of the built encoder, such as the data types allowed for input events and the outputs exposed by the encoder.

Required Methods§

Source

fn input_event_type(&self) -> EventType

Data types allowed as input payloads to this encoder.

Source

fn output_payload_type(&self) -> PayloadType

Data types emitted as output payloads by this encoder.

Source

fn build<'life0, 'async_trait>( &'life0 self, context: ComponentContext, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Encoder + Send>, GenericError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Builds an instance of the encoder.

§Errors

If the encoder cannot be built for any reason, an error is returned.

Implementors§