pub struct TraceForwardClient { /* private fields */ }Expand description
Mux-aware trace-forward client
Implementations§
Source§impl TraceForwardClient
impl TraceForwardClient
Sourcepub fn new(channel: AgentChannel) -> Self
pub fn new(channel: AgentChannel) -> Self
Create a new client from a multiplexer channel
Sourcepub async fn send_message(&mut self, msg: &Message) -> Result<(), ClientError>
pub async fn send_message(&mut self, msg: &Message) -> Result<(), ClientError>
Send a message to the acceptor
Sourcepub async fn recv_message(&mut self) -> Result<Message, ClientError>
pub async fn recv_message(&mut self) -> Result<Message, ClientError>
Receive a message from the acceptor
Sourcepub async fn handle_request(
&mut self,
traces: Vec<TraceObject>,
) -> Result<(), ClientError>
pub async fn handle_request( &mut self, traces: Vec<TraceObject>, ) -> Result<(), ClientError>
Wait for a trace objects request from the acceptor and send traces
Sourcepub async fn send_done(&mut self) -> Result<(), ClientError>
pub async fn send_done(&mut self) -> Result<(), ClientError>
Send a Done message to close the connection gracefully
Auto Trait Implementations§
impl Freeze for TraceForwardClient
impl RefUnwindSafe for TraceForwardClient
impl Send for TraceForwardClient
impl Sync for TraceForwardClient
impl Unpin for TraceForwardClient
impl UnsafeUnpin for TraceForwardClient
impl UnwindSafe for TraceForwardClient
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more