pub struct ResilientStdioTransport {
inbound_rx: Receiver<RxJsonRpcMessage<RoleServer>>,
outbound_tx: Arc<Mutex<Option<UnboundedSender<TxJsonRpcMessage<RoleServer>>>>>,
}Expand description
Resilient stdio transport — see module docs.
Fields§
§inbound_rx: Receiver<RxJsonRpcMessage<RoleServer>>§outbound_tx: Arc<Mutex<Option<UnboundedSender<TxJsonRpcMessage<RoleServer>>>>>Wrapped in Arc<Mutex<>> so send() can return a 'static future
per the Transport trait contract.
Implementations§
Trait Implementations§
Source§impl Transport<RoleServer> for ResilientStdioTransport
impl Transport<RoleServer> for ResilientStdioTransport
type Error = TransportError
Source§fn send(
&mut self,
item: TxJsonRpcMessage<RoleServer>,
) -> impl Future<Output = Result<(), Self::Error>> + Send + 'static
fn send( &mut self, item: TxJsonRpcMessage<RoleServer>, ) -> impl Future<Output = Result<(), Self::Error>> + Send + 'static
Send a message to the transport Read more
Source§async fn receive(&mut self) -> Option<RxJsonRpcMessage<RoleServer>>
async fn receive(&mut self) -> Option<RxJsonRpcMessage<RoleServer>>
Receive a message from the transport, this operation is sequential.
fn name() -> Cow<'static, str>
Auto Trait Implementations§
impl Freeze for ResilientStdioTransport
impl !RefUnwindSafe for ResilientStdioTransport
impl Send for ResilientStdioTransport
impl Sync for ResilientStdioTransport
impl Unpin for ResilientStdioTransport
impl UnsafeUnpin for ResilientStdioTransport
impl !UnwindSafe for ResilientStdioTransport
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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