Struct tor_proto::channel::OutboundClientHandshake
source · [−]pub struct OutboundClientHandshake<T: AsyncRead + AsyncWrite + Send + Unpin + 'static, S: SleepProvider> { /* private fields */ }
Expand description
A raw client channel on which nothing has been done.
Implementations
sourceimpl<T: AsyncRead + AsyncWrite + Send + Unpin + 'static, S: SleepProvider> OutboundClientHandshake<T, S>
impl<T: AsyncRead + AsyncWrite + Send + Unpin + 'static, S: SleepProvider> OutboundClientHandshake<T, S>
sourcepub async fn connect<F>(self, now_fn: F) -> Result<UnverifiedChannel<T, S>> where
F: FnOnce() -> SystemTime,
pub async fn connect<F>(self, now_fn: F) -> Result<UnverifiedChannel<T, S>> where
F: FnOnce() -> SystemTime,
Negotiate a link protocol version with the relay, and read the relay’s handshake information.
Takes a function that reports the current time. In theory, this can just be
SystemTime::now()
.
Auto Trait Implementations
impl<T, S> RefUnwindSafe for OutboundClientHandshake<T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for OutboundClientHandshake<T, S>
impl<T, S> Sync for OutboundClientHandshake<T, S> where
T: Sync,
impl<T, S> Unpin for OutboundClientHandshake<T, S> where
S: Unpin,
impl<T, S> UnwindSafe for OutboundClientHandshake<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