trait MockableClientCirc: Debug {
type DirStream: AsyncRead + AsyncWrite + Send + Unpin;
type Conversation<'r>
where Self: 'r;
// Required methods
fn m_begin_dir_stream<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = Result<Self::DirStream>> + Send + 'async_trait>>
where Self: 'async_trait;
fn m_start_conversation_last_hop<'life0, 'async_trait>(
&'life0 self,
msg: Option<AnyRelayMsg>,
reply_handler: impl 'async_trait + MsgHandler + Send + 'static,
) -> Pin<Box<dyn Future<Output = Result<Self::Conversation<'_>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn m_extend_virtual<'life0, 'life1, 'async_trait>(
&'life0 self,
protocol: RelayProtocol,
role: HandshakeRole,
handshake: impl 'async_trait + KeyGenerator + Send,
params: CircParameters,
capabilities: &'life1 Protocols,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Mock for ClientCirc
Required Associated Types§
Sourcetype Conversation<'r>
where
Self: 'r
type Conversation<'r> where Self: 'r
Conversation
Required Methods§
fn m_begin_dir_stream<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = Result<Self::DirStream>> + Send + 'async_trait>>where
Self: 'async_trait,
Sourcefn m_start_conversation_last_hop<'life0, 'async_trait>(
&'life0 self,
msg: Option<AnyRelayMsg>,
reply_handler: impl 'async_trait + MsgHandler + Send + 'static,
) -> Pin<Box<dyn Future<Output = Result<Self::Conversation<'_>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn m_start_conversation_last_hop<'life0, 'async_trait>(
&'life0 self,
msg: Option<AnyRelayMsg>,
reply_handler: impl 'async_trait + MsgHandler + Send + 'static,
) -> Pin<Box<dyn Future<Output = Result<Self::Conversation<'_>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Converse
Sourcefn m_extend_virtual<'life0, 'life1, 'async_trait>(
&'life0 self,
protocol: RelayProtocol,
role: HandshakeRole,
handshake: impl 'async_trait + KeyGenerator + Send,
params: CircParameters,
capabilities: &'life1 Protocols,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn m_extend_virtual<'life0, 'life1, 'async_trait>(
&'life0 self,
protocol: RelayProtocol,
role: HandshakeRole,
handshake: impl 'async_trait + KeyGenerator + Send,
params: CircParameters,
capabilities: &'life1 Protocols,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add a virtual hop to the circuit.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl MockableClientCirc for ClientCirc
impl MockableClientCirc for ClientCirc
Source§type DirStream = DataStream
type DirStream = DataStream
Client circuit