pub struct HybridStdioTransport<Role: ServiceRole, R: AsyncRead, W: AsyncWrite> { /* private fields */ }Implementations§
Source§impl<Role: ServiceRole, R, W> HybridStdioTransport<Role, R, W>
impl<Role: ServiceRole, R, W> HybridStdioTransport<Role, R, W>
Source§impl<R, W> HybridStdioTransport<RoleServer, R, W>
impl<R, W> HybridStdioTransport<RoleServer, R, W>
pub fn new_server(read: R, write: W) -> Self
Trait Implementations§
Source§impl<Role: ServiceRole, R, W> Transport<Role> for HybridStdioTransport<Role, R, W>
impl<Role: ServiceRole, R, W> Transport<Role> for HybridStdioTransport<Role, R, W>
type Error = Error
Source§fn send(
&mut self,
item: TxJsonRpcMessage<Role>,
) -> impl Future<Output = Result<(), Self::Error>> + Send + 'static
fn send( &mut self, item: TxJsonRpcMessage<Role>, ) -> impl Future<Output = Result<(), Self::Error>> + Send + 'static
Send a message to the transport Read more
Source§fn receive(
&mut self,
) -> impl Future<Output = Option<RxJsonRpcMessage<Role>>> + Send
fn receive( &mut self, ) -> impl Future<Output = Option<RxJsonRpcMessage<Role>>> + Send
Receive a message from the transport, this operation is sequential.
fn name() -> Cow<'static, str>
Auto Trait Implementations§
impl<Role, R, W> Freeze for HybridStdioTransport<Role, R, W>where
R: Freeze,
impl<Role, R, W> !RefUnwindSafe for HybridStdioTransport<Role, R, W>
impl<Role, R, W> Send for HybridStdioTransport<Role, R, W>
impl<Role, R, W> Sync for HybridStdioTransport<Role, R, W>
impl<Role, R, W> Unpin for HybridStdioTransport<Role, R, W>where
R: Unpin,
impl<Role, R, W> UnsafeUnpin for HybridStdioTransport<Role, R, W>where
R: UnsafeUnpin,
impl<Role, R, W> !UnwindSafe for HybridStdioTransport<Role, R, W>
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