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§
Sourcetype DataStream: AsyncRead + AsyncWrite + Send + Unpin
type DataStream: AsyncRead + AsyncWrite + Send + Unpin
The data stream type.
Required Methods§
Sourcefn 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 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.
Sourcefn source_info(&self) -> Result<Option<SourceInfo>>
fn source_info(&self) -> Result<Option<SourceInfo>>
Try to get a SourceInfo for this circuit, for using it in a directory request.