Struct tor_proto::circuit::PendingClientCirc
source · [−]pub struct PendingClientCirc { /* private fields */ }
Expand description
A ClientCirc that needs to send a create cell and receive a created* cell.
To use one of these, call create_firsthop_fast() or create_firsthop_ntor() to negotiate the cryptographic handshake with the first hop.
Implementations
sourceimpl PendingClientCirc
impl PendingClientCirc
sourcepub async fn create_firsthop_fast(
self,
params: &CircParameters
) -> Result<ClientCirc>
pub async fn create_firsthop_fast(
self,
params: &CircParameters
) -> Result<ClientCirc>
Use the (questionable!) CREATE_FAST handshake to connect to the first hop of this circuit.
There’s no authentication in CRATE_FAST, so we don’t need to know whom we’re connecting to: we’re just connecting to whichever relay the channel is for.
sourcepub async fn create_firsthop_ntor<Tg>(
self,
target: &Tg,
params: CircParameters
) -> Result<ClientCirc> where
Tg: CircTarget,
pub async fn create_firsthop_ntor<Tg>(
self,
target: &Tg,
params: CircParameters
) -> Result<ClientCirc> where
Tg: CircTarget,
Use the ntor handshake to connect to the first hop of this circuit.
Note that the provided ‘target’ must match the channel’s target, or the handshake will fail.
Auto Trait Implementations
impl !RefUnwindSafe for PendingClientCirc
impl Send for PendingClientCirc
impl Sync for PendingClientCirc
impl Unpin for PendingClientCirc
impl !UnwindSafe for PendingClientCirc
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