Skip to main content

ForwarderBuilder

Trait ForwarderBuilder 

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

A forwarder builder.

Forwarder builders are responsible for creating instances of Forwarders, as well as describing high-level aspects of the built forwarder, such as the data types allowed for input events.

Required Methods§

Source

fn input_payload_type(&self) -> PayloadType

Data types allowed as input payloads to this forwarder.

Source

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

Builds an instance of the forwarder.

§Errors

If the forwarder 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".

Implementors§