Skip to main content

MockableDirTunnel

Trait MockableDirTunnel 

Source
pub(crate) trait MockableDirTunnel: Send + Sync {
    type DataStream: AsyncRead + AsyncWrite + Send + Unpin;

    // Required methods
    fn begin_dir_stream<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::DataStream, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn source_info(&self) -> Result<Option<SourceInfo>>;
}
Expand description

Mockable client circuit

Required Associated Types§

Source

type DataStream: AsyncRead + AsyncWrite + Send + Unpin

The data stream type.

Required Methods§

Source

fn begin_dir_stream<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::DataStream, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Start a new stream to the last relay in the circuit, using a BEGIN_DIR cell.

Source

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

Try to get a SourceInfo for this circuit, for using it in a directory request.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MockableDirTunnel for ServiceOnionServiceDirTunnel

Source§

type DataStream = DataStream

Source§

fn begin_dir_stream<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::DataStream, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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

Implementors§