pub struct CallClient<Carrier: LinkCarrier> { /* private fields */ }Expand description
Owns its carrier and Noise counters. Debug exposes counters, never frame bytes.
Implementations§
Source§impl CallClient<WireCarrier>
impl CallClient<WireCarrier>
Sourcepub fn wire(link: DialedLink, bound: usize) -> Self
pub fn wire(link: DialedLink, bound: usize) -> Self
Uses the already admitted and proved wire link without another connection.
Source§impl<Carrier: LinkCarrier> CallClient<Carrier>
impl<Carrier: LinkCarrier> CallClient<Carrier>
Sourcepub const fn new(
carrier: Carrier,
transport: LinkTransport,
bound: usize,
) -> Self
pub const fn new( carrier: Carrier, transport: LinkTransport, bound: usize, ) -> Self
Uses an endpoint-keyed wire or relay carrier and its proved transport.
Sourcepub fn call(&mut self, request: CallRequest) -> Result<Frame, CallError>
pub fn call(&mut self, request: CallRequest) -> Result<Frame, CallError>
Sends an original caller request and returns its far conversation answer. The far full connection owns its configured deadline and all pending slots.
§Errors
Encoding/cap/correlation refusal, carrier end, or a named crossing refusal.
Sourcepub fn end_reason(&self) -> Option<String>
pub fn end_reason(&self) -> Option<String>
The carrier’s named end behind a PeerGone: the peer’s close reason,
wire_eof, or the failure that ended the carrier; None while live.
Sourcepub const fn frames_sent(&self) -> u64
pub const fn frames_sent(&self) -> u64
Actual application sends; constructing or holding an idle client sends none.
Trait Implementations§
Auto Trait Implementations§
impl<Carrier> !RefUnwindSafe for CallClient<Carrier>
impl<Carrier> !UnwindSafe for CallClient<Carrier>
impl<Carrier> Freeze for CallClient<Carrier>where
Carrier: Freeze,
impl<Carrier> Send for CallClient<Carrier>
impl<Carrier> Sync for CallClient<Carrier>where
Carrier: Sync,
impl<Carrier> Unpin for CallClient<Carrier>where
Carrier: Unpin,
impl<Carrier> UnsafeUnpin for CallClient<Carrier>where
Carrier: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more