pub trait IncrementalEncoderBuilder: MemoryBounds {
type Output: IncrementalEncoder;
// 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<Self::Output, GenericError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An incremental encoder builder.
Incremental encoder builders are responsible for creating instances of IncrementalEncoders, as well as
describing high-level aspects of the built incremental encoder, such as the data types allowed for input events and
the outputs exposed by the incremental encoder.
Required Associated Types§
Sourcetype Output: IncrementalEncoder
type Output: IncrementalEncoder
Type of the incremental encoder to be built.
Required Methods§
Sourcefn input_event_type(&self) -> EventType
fn input_event_type(&self) -> EventType
Data types allowed as input payloads to this incremental encoder.
Sourcefn output_payload_type(&self) -> PayloadType
fn output_payload_type(&self) -> PayloadType
Data types emitted as output payloads by this incremental encoder.
Sourcefn build<'life0, 'async_trait>(
&'life0 self,
context: ComponentContext,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn build<'life0, 'async_trait>(
&'life0 self,
context: ComponentContext,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Builds an instance of the incremental encoder.
§Errors
If the incremental encoder can’t be built for any reason, an error is returned.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".