pub trait ChannelProvider {
type BuildSpec: HasRelayIds;
// Required method
fn get_or_launch(
self: Arc<Self>,
reactor_id: UniqId,
target: Self::BuildSpec,
tx: OutboundChanSender,
) -> Result<()>;
}Expand description
An object that can fulfill outbound channel requests issued by the relay circuit reactor.
The implementor is responsible for imposing a limit on the number of outbound channels that can be opened on a given circuit.
Required Associated Types§
Sourcetype BuildSpec: HasRelayIds
type BuildSpec: HasRelayIds
Type that explains how to build an outgoing channel.
Required Methods§
Sourcefn get_or_launch(
self: Arc<Self>,
reactor_id: UniqId,
target: Self::BuildSpec,
tx: OutboundChanSender,
) -> Result<()>
fn get_or_launch( self: Arc<Self>, reactor_id: UniqId, target: Self::BuildSpec, tx: OutboundChanSender, ) -> Result<()>
Get a channel corresponding to the identities of target, for the circuit reactor with the
specified reactor_id which should only be used for logging purposes.
Returns the requested channel via the specified OutboundChanSender.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".