Struct toy_rpc::codec::Codec [−][src]
Default codec. Codec
is re-exported as DefaultCodec
when one of these feature
flags is toggled (serde_bincode
, serde_json
, serde_cbor
, serde_rmp
“)
Fields
reader: R
writer: W
Implementations
impl<R, W> Codec<R, W, ConnTypeReadWrite> where
R: AsyncRead + Send + Sync + Unpin,
W: AsyncWrite + Send + Sync + Unpin,
[src]
R: AsyncRead + Send + Sync + Unpin,
W: AsyncWrite + Send + Sync + Unpin,
pub fn with_reader_writer(reader: R, writer: W) -> Self
[src]
impl<T> Codec<BufReader<ReadHalf<T>>, BufWriter<WriteHalf<T>>, ConnTypeReadWrite> where
T: AsyncRead + AsyncWrite + Send + Sync + Unpin,
[src]
T: AsyncRead + AsyncWrite + Send + Sync + Unpin,
impl<S, E> Codec<StreamHalf<SplitStream<S>, CanSink>, SinkHalf<SplitSink<S, WsMessage>, CanSink>, ConnTypePayload> where
S: Stream<Item = Result<WsMessage, E>> + Sink<WsMessage> + Send + Sync + Unpin,
E: Error + 'static,
[src]
S: Stream<Item = Result<WsMessage, E>> + Sink<WsMessage> + Send + Sync + Unpin,
E: Error + 'static,
pub fn with_websocket(ws: WebSocketConn<S, CanSink>) -> Self
[src]
impl Codec<StreamHalf<WebSocketConnection, CannotSink>, SinkHalf<WebSocketConnection, CannotSink>, ConnTypePayload>
[src]
pub fn with_tide_websocket(
ws: WebSocketConn<WebSocketConnection, CannotSink>
) -> Self
[src]
ws: WebSocketConn<WebSocketConnection, CannotSink>
) -> Self
impl<S, E> Codec<SplitStream<S>, SplitSink<S, Message>, ConnTypePayload> where
S: Stream<Item = Result<Message, E>> + Sink<Message>,
E: Error,
[src]
S: Stream<Item = Result<Message, E>> + Sink<Message>,
E: Error,
pub fn with_warp_websocket(ws: S) -> Self
[src]
Trait Implementations
impl<R, W> GracefulShutdown for Codec<R, W, ConnTypeReadWrite> where
R: AsyncRead + Send + Sync + Unpin,
W: AsyncWrite + Send + Sync + Unpin,
[src]
R: AsyncRead + Send + Sync + Unpin,
W: AsyncWrite + Send + Sync + Unpin,
fn close<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl<R, W> GracefulShutdown for Codec<R, W, ConnTypePayload> where
R: Send,
W: GracefulShutdown + Send,
[src]
R: Send,
W: GracefulShutdown + Send,
Auto Trait Implementations
impl<R, W, C> RefUnwindSafe for Codec<R, W, C> where
C: RefUnwindSafe,
R: RefUnwindSafe,
W: RefUnwindSafe,
C: RefUnwindSafe,
R: RefUnwindSafe,
W: RefUnwindSafe,
impl<R, W, C> Send for Codec<R, W, C> where
C: Send,
R: Send,
W: Send,
C: Send,
R: Send,
W: Send,
impl<R, W, C> Sync for Codec<R, W, C> where
C: Sync,
R: Sync,
W: Sync,
C: Sync,
R: Sync,
W: Sync,
impl<R, W, C> Unpin for Codec<R, W, C> where
C: Unpin,
R: Unpin,
W: Unpin,
C: Unpin,
R: Unpin,
W: Unpin,
impl<R, W, C> UnwindSafe for Codec<R, W, C> where
C: UnwindSafe,
R: UnwindSafe,
W: UnwindSafe,
C: UnwindSafe,
R: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,