pub trait LogSink:
Send
+ Sync
+ 'static {
// Required methods
fn send<'a>(
&'a self,
batch: &'a [ForwardDocument],
) -> BoxFuture<'a, BatchOutcome>;
fn describe(&self) -> String;
}Expand description
Somewhere documents can be sent.
Boxed futures rather than async fn so the forwarder can hold a dyn LogSink and swap a mock
in under test without being generic over the sink everywhere.
Required Methods§
fn send<'a>( &'a self, batch: &'a [ForwardDocument], ) -> BoxFuture<'a, BatchOutcome>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".