Skip to main content

MockableClientDir

Trait MockableClientDir 

Source
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§

Source

type DirStream: AsyncRead + AsyncWrite + Send + Unpin

Client circuit

Required Methods§

Source

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,

Source

fn m_source_info(&self) -> Result<Option<SourceInfo>>

Get a tor_dirclient::SourceInfo for this circuit, if possible.

Source

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

Source§

type DirStream = DataStream

Client circuit

Source§

fn m_source_info(&self) -> Result<Option<SourceInfo>>

Get a tor_dirclient::SourceInfo for this circuit, if possible.

Source§

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,

Source§

fn m_num_hops(&self) -> Result<usize>

Implementors§