Struct tor_proto::channel::ChannelBuilder
source · [−]pub struct ChannelBuilder { /* private fields */ }
Expand description
Structure for building and launching a Tor channel.
Implementations
sourceimpl ChannelBuilder
impl ChannelBuilder
sourcepub fn set_declared_addr(&mut self, target: SocketAddr)
pub fn set_declared_addr(&mut self, target: SocketAddr)
Set the declared target address of this channel.
Note that nothing enforces the correctness of this address: it doesn’t have to match the real address target of the TLS stream. For now it is only used for logging.
sourcepub fn launch<T, S>(
self,
tls: T,
sleep_prov: S
) -> OutboundClientHandshake<T, S> where
T: AsyncRead + AsyncWrite + Send + Unpin + 'static,
S: SleepProvider,
pub fn launch<T, S>(
self,
tls: T,
sleep_prov: S
) -> OutboundClientHandshake<T, S> where
T: AsyncRead + AsyncWrite + Send + Unpin + 'static,
S: SleepProvider,
Launch a new client handshake over a TLS stream.
After calling this function, you’ll need to call connect()
on
the result to start the handshake. If that succeeds, you’ll have
authentication info from the relay: call check()
on the result
to check that. Finally, to finish the handshake, call finish()
on the result of that.
Trait Implementations
sourceimpl Default for ChannelBuilder
impl Default for ChannelBuilder
sourcefn default() -> ChannelBuilder
fn default() -> ChannelBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ChannelBuilder
impl Send for ChannelBuilder
impl Sync for ChannelBuilder
impl Unpin for ChannelBuilder
impl UnwindSafe for ChannelBuilder
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