trait MockableClientDir: Debug {
type DirStream: AsyncRead + AsyncWrite + Send + Unpin;
// Required methods
fn m_begin_dir_stream<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::DirStream>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn m_source_info(&self) -> Result<Option<SourceInfo>>;
fn m_num_hops(&self) -> Result<usize>;
}Expand description
Mock for onion service client directory tunnel.
Required Associated Types§
Required Methods§
fn m_begin_dir_stream<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::DirStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn m_source_info(&self) -> Result<Option<SourceInfo>>
fn m_source_info(&self) -> Result<Option<SourceInfo>>
Get a tor_dirclient::SourceInfo for this circuit, if possible.
Sourcefn m_num_hops(&self) -> Result<usize>
fn m_num_hops(&self) -> Result<usize>
Return the length of this circuit.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl MockableClientDir for ClientOnionServiceDirTunnel
impl MockableClientDir for ClientOnionServiceDirTunnel
Source§type DirStream = DataStream
type DirStream = DataStream
Client circuit
Source§fn m_source_info(&self) -> Result<Option<SourceInfo>>
fn m_source_info(&self) -> Result<Option<SourceInfo>>
Get a tor_dirclient::SourceInfo for this circuit, if possible.