pub trait DestinationBuilder: MemoryBounds {
// Required methods
fn input_event_type(&self) -> EventType;
fn build<'life0, 'async_trait>(
&'life0 self,
context: ComponentContext,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Destination + Send>, GenericError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A destination builder.
Destination builders are responsible for creating instances of Destination
s, as well as describing high-level
aspects of the built destination, such as the data types allowed for input events.
Required Methods§
Sourcefn input_event_type(&self) -> EventType
fn input_event_type(&self) -> EventType
Event types allowed as input events to this destination.
Sourcefn build<'life0, 'async_trait>(
&'life0 self,
context: ComponentContext,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Destination + Send>, 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<Box<dyn Destination + Send>, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Builds an instance of the destination.
§Errors
If the destination cannot be built for any reason, an error is returned.