[−][src]Trait sentry::TransportFactory
A factory creating transport instances.
Because options are potentially reused between different clients the options do not actually contain a transport but a factory object that can create transports instead.
The factory has a single method that creates a new arced transport.
Because transports can be wrapped in Arc
s and those are clonable
any Arc<Transport>
is also a valid transport factory. This for
instance lets you put a Arc<TestTransport>
directly into the options.
This is automatically implemented for all closures optionally taking options and returning a boxed factory.
Required methods
fn create_transport(
&self,
options: &ClientOptions
) -> Arc<dyn Transport + 'static>
&self,
options: &ClientOptions
) -> Arc<dyn Transport + 'static>
Given some options creates a transport.
Implementations on Foreign Types
impl<T> TransportFactory for Arc<T> where
T: Transport,
[src]
T: Transport,
fn create_transport(
&self,
options: &ClientOptions
) -> Arc<dyn Transport + 'static>
[src]
&self,
options: &ClientOptions
) -> Arc<dyn Transport + 'static>
Implementors
impl TransportFactory for DefaultTransportFactory
[src]
fn create_transport(&self, options: &ClientOptions) -> Arc<dyn Transport>
[src]
impl<F> TransportFactory for F where
F: Fn(&ClientOptions) -> Arc<dyn Transport + 'static> + Clone + Send + Sync + 'static,
[src]
F: Fn(&ClientOptions) -> Arc<dyn Transport + 'static> + Clone + Send + Sync + 'static,
fn create_transport(
&self,
options: &ClientOptions
) -> Arc<dyn Transport + 'static>
[src]
&self,
options: &ClientOptions
) -> Arc<dyn Transport + 'static>