Struct tor_proto::channel::VerifiedChannel
source · [−]pub struct VerifiedChannel<T: AsyncRead + AsyncWrite + Send + Unpin + 'static, S: SleepProvider> { /* private fields */ }
Expand description
A client channel on which versions have been negotiated, relay’s handshake has been read, but the client has not yet finished the handshake.
This type is separate from UnverifiedChannel, since finishing the handshake requires a bunch of CPU, and you might want to do it as a separate task or after a yield.
Implementations
sourceimpl<T: AsyncRead + AsyncWrite + Send + Unpin + 'static, S: SleepProvider> VerifiedChannel<T, S>
impl<T: AsyncRead + AsyncWrite + Send + Unpin + 'static, S: SleepProvider> VerifiedChannel<T, S>
sourcepub async fn finish(self) -> Result<(Channel, Reactor<S>)>
pub async fn finish(self) -> Result<(Channel, Reactor<S>)>
Send a ‘Netinfo’ message to the relay to finish the handshake, and create an open channel and reactor.
The channel is used to send cells, and to create outgoing circuits. The reactor is used to route incoming messages to their appropriate circuit.
Auto Trait Implementations
impl<T, S> RefUnwindSafe for VerifiedChannel<T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for VerifiedChannel<T, S>
impl<T, S> Sync for VerifiedChannel<T, S> where
T: Sync,
impl<T, S> Unpin for VerifiedChannel<T, S> where
S: Unpin,
impl<T, S> UnwindSafe for VerifiedChannel<T, S> where
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more