[−][src]Trait async_proto::Protocol
This trait allows reading a value of an implementing type from an async or sync stream, as well as writing one to an async or sync sink.
Associated Types
type ReadError
[src]
The error returned from the read
and read_sync
methods.
It can be an io::Error
or an error representing malformed data.
Required methods
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
stream: R
) -> Pin<Box<dyn Future<Output = Result<Self, Self::ReadError>> + Send + 'a>>
[src]
stream: R
) -> Pin<Box<dyn Future<Output = Result<Self, Self::ReadError>> + Send + 'a>>
Reads a value of this type from an async stream.
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
Writes a value of this type to an async sink.
fn read_sync<'a>(stream: impl Read + 'a) -> Result<Self, Self::ReadError>
[src]
Reads a value of this type from a sync stream.
fn write_sync<'a>(&self, sink: impl Write + 'a) -> Result<()>
[src]
Writes a value of this type to a sync sink.
Implementations on Foreign Types
impl Protocol for u8
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u8>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u8>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<u8>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for i8
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i8>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i8>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<i8>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for u16
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u16>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u16>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<u16>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for i16
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i16>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i16>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<i16>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for u32
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<u32>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for i32
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<i32>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for u64
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<u64>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for i64
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<i64>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for u128
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u128>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<u128>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<u128>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for i128
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i128>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<i128>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<i128>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync> Protocol for (A,) where
A::ReadError: Send,
[src]
A::ReadError: Send,
type ReadError = Tuple1ReadError<A>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A,), Tuple1ReadError<A>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A,), Tuple1ReadError<A>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<(A,), Tuple1ReadError<A>>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync> Protocol for (A, B) where
A::ReadError: Send,
B::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
type ReadError = Tuple2ReadError<A, B>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B), Tuple2ReadError<A, B>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B), Tuple2ReadError<A, B>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B), Tuple2ReadError<A, B>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B), Tuple2ReadError<A, B>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync> Protocol for (A, B, C) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
type ReadError = Tuple3ReadError<A, B, C>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C), Tuple3ReadError<A, B, C>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C), Tuple3ReadError<A, B, C>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C), Tuple3ReadError<A, B, C>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C), Tuple3ReadError<A, B, C>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync> Protocol for (A, B, C, D) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
type ReadError = Tuple4ReadError<A, B, C, D>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D), Tuple4ReadError<A, B, C, D>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D), Tuple4ReadError<A, B, C, D>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D), Tuple4ReadError<A, B, C, D>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D), Tuple4ReadError<A, B, C, D>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync, E: Protocol + Send + Sync> Protocol for (A, B, C, D, E) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
type ReadError = Tuple5ReadError<A, B, C, D, E>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E), Tuple5ReadError<A, B, C, D, E>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E), Tuple5ReadError<A, B, C, D, E>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E), Tuple5ReadError<A, B, C, D, E>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E), Tuple5ReadError<A, B, C, D, E>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync, E: Protocol + Send + Sync, F: Protocol + Send + Sync> Protocol for (A, B, C, D, E, F) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
type ReadError = Tuple6ReadError<A, B, C, D, E, F>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F), Tuple6ReadError<A, B, C, D, E, F>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F), Tuple6ReadError<A, B, C, D, E, F>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F), Tuple6ReadError<A, B, C, D, E, F>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F), Tuple6ReadError<A, B, C, D, E, F>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync, E: Protocol + Send + Sync, F: Protocol + Send + Sync, G: Protocol + Send + Sync> Protocol for (A, B, C, D, E, F, G) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
type ReadError = Tuple7ReadError<A, B, C, D, E, F, G>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G), Tuple7ReadError<A, B, C, D, E, F, G>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G), Tuple7ReadError<A, B, C, D, E, F, G>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G), Tuple7ReadError<A, B, C, D, E, F, G>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G), Tuple7ReadError<A, B, C, D, E, F, G>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync, E: Protocol + Send + Sync, F: Protocol + Send + Sync, G: Protocol + Send + Sync, H: Protocol + Send + Sync> Protocol for (A, B, C, D, E, F, G, H) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
type ReadError = Tuple8ReadError<A, B, C, D, E, F, G, H>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H), Tuple8ReadError<A, B, C, D, E, F, G, H>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H), Tuple8ReadError<A, B, C, D, E, F, G, H>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H), Tuple8ReadError<A, B, C, D, E, F, G, H>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H), Tuple8ReadError<A, B, C, D, E, F, G, H>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync, E: Protocol + Send + Sync, F: Protocol + Send + Sync, G: Protocol + Send + Sync, H: Protocol + Send + Sync, I: Protocol + Send + Sync> Protocol for (A, B, C, D, E, F, G, H, I) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
I::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
I::ReadError: Send,
type ReadError = Tuple9ReadError<A, B, C, D, E, F, G, H, I>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H, I), Tuple9ReadError<A, B, C, D, E, F, G, H, I>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H, I), Tuple9ReadError<A, B, C, D, E, F, G, H, I>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H, I), Tuple9ReadError<A, B, C, D, E, F, G, H, I>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H, I), Tuple9ReadError<A, B, C, D, E, F, G, H, I>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync, E: Protocol + Send + Sync, F: Protocol + Send + Sync, G: Protocol + Send + Sync, H: Protocol + Send + Sync, I: Protocol + Send + Sync, J: Protocol + Send + Sync> Protocol for (A, B, C, D, E, F, G, H, I, J) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
I::ReadError: Send,
J::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
I::ReadError: Send,
J::ReadError: Send,
type ReadError = Tuple10ReadError<A, B, C, D, E, F, G, H, I, J>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H, I, J), Tuple10ReadError<A, B, C, D, E, F, G, H, I, J>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H, I, J), Tuple10ReadError<A, B, C, D, E, F, G, H, I, J>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H, I, J), Tuple10ReadError<A, B, C, D, E, F, G, H, I, J>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H, I, J), Tuple10ReadError<A, B, C, D, E, F, G, H, I, J>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync, E: Protocol + Send + Sync, F: Protocol + Send + Sync, G: Protocol + Send + Sync, H: Protocol + Send + Sync, I: Protocol + Send + Sync, J: Protocol + Send + Sync, K: Protocol + Send + Sync> Protocol for (A, B, C, D, E, F, G, H, I, J, K) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
I::ReadError: Send,
J::ReadError: Send,
K::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
I::ReadError: Send,
J::ReadError: Send,
K::ReadError: Send,
type ReadError = Tuple11ReadError<A, B, C, D, E, F, G, H, I, J, K>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H, I, J, K), Tuple11ReadError<A, B, C, D, E, F, G, H, I, J, K>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H, I, J, K), Tuple11ReadError<A, B, C, D, E, F, G, H, I, J, K>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H, I, J, K), Tuple11ReadError<A, B, C, D, E, F, G, H, I, J, K>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H, I, J, K), Tuple11ReadError<A, B, C, D, E, F, G, H, I, J, K>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<A: Protocol + Send + Sync, B: Protocol + Send + Sync, C: Protocol + Send + Sync, D: Protocol + Send + Sync, E: Protocol + Send + Sync, F: Protocol + Send + Sync, G: Protocol + Send + Sync, H: Protocol + Send + Sync, I: Protocol + Send + Sync, J: Protocol + Send + Sync, K: Protocol + Send + Sync, L: Protocol + Send + Sync> Protocol for (A, B, C, D, E, F, G, H, I, J, K, L) where
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
I::ReadError: Send,
J::ReadError: Send,
K::ReadError: Send,
L::ReadError: Send,
[src]
A::ReadError: Send,
B::ReadError: Send,
C::ReadError: Send,
D::ReadError: Send,
E::ReadError: Send,
F::ReadError: Send,
G::ReadError: Send,
H::ReadError: Send,
I::ReadError: Send,
J::ReadError: Send,
K::ReadError: Send,
L::ReadError: Send,
type ReadError = Tuple12ReadError<A, B, C, D, E, F, G, H, I, J, K, L>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H, I, J, K, L), Tuple12ReadError<A, B, C, D, E, F, G, H, I, J, K, L>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<(A, B, C, D, E, F, G, H, I, J, K, L), Tuple12ReadError<A, B, C, D, E, F, G, H, I, J, K, L>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H, I, J, K, L), Tuple12ReadError<A, B, C, D, E, F, G, H, I, J, K, L>>
[src]
mut stream: impl Read + 'a
) -> Result<(A, B, C, D, E, F, G, H, I, J, K, L), Tuple12ReadError<A, B, C, D, E, F, G, H, I, J, K, L>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for ()
[src]
type ReadError = Never
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
_: R
) -> Pin<Box<dyn Future<Output = Result<(), Never>> + Send + 'a>>
[src]
_: R
) -> Pin<Box<dyn Future<Output = Result<(), Never>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
_: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
_: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(_: impl Read + 'a) -> Result<(), Never>
[src]
fn write_sync<'a>(&self, _: impl Write + 'a) -> Result<()>
[src]
impl Protocol for bool
[src]
type ReadError = BoolReadError
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
stream: R
) -> Pin<Box<dyn Future<Output = Result<bool, BoolReadError>> + Send + 'a>>
[src]
stream: R
) -> Pin<Box<dyn Future<Output = Result<bool, BoolReadError>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(stream: impl Read + 'a) -> Result<bool, BoolReadError>
[src]
fn write_sync<'a>(&self, sink: impl Write + 'a) -> Result<()>
[src]
impl<T: Protocol + Sync> Protocol for Option<T>
[src]
type ReadError = OptionReadError<T>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<Option<T>, OptionReadError<T>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<Option<T>, OptionReadError<T>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<Option<T>, OptionReadError<T>>
[src]
mut stream: impl Read + 'a
) -> Result<Option<T>, OptionReadError<T>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<T: Protocol + Send + Sync> Protocol for Vec<T>
[src]
type ReadError = SeqReadError<T>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, SeqReadError<T>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, SeqReadError<T>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(mut stream: impl Read + 'a) -> Result<Vec<T>, SeqReadError<T>>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<T: Protocol + Ord + Send + Sync + 'static> Protocol for BTreeSet<T>
[src]
type ReadError = SeqReadError<T>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<T>, SeqReadError<T>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<T>, SeqReadError<T>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<BTreeSet<T>, SeqReadError<T>>
[src]
mut stream: impl Read + 'a
) -> Result<BTreeSet<T>, SeqReadError<T>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<T: Protocol + Eq + Hash + Send + Sync> Protocol for HashSet<T>
[src]
type ReadError = SeqReadError<T>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<HashSet<T>, SeqReadError<T>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<HashSet<T>, SeqReadError<T>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<HashSet<T>, SeqReadError<T>>
[src]
mut stream: impl Read + 'a
) -> Result<HashSet<T>, SeqReadError<T>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for String
[src]
type ReadError = StringReadError
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
stream: R
) -> Pin<Box<dyn Future<Output = Result<String, StringReadError>> + Send + 'a>>
[src]
stream: R
) -> Pin<Box<dyn Future<Output = Result<String, StringReadError>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(stream: impl Read + 'a) -> Result<String, StringReadError>
[src]
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<K: Protocol + Ord + Send + Sync + 'static, V: Protocol + Send + Sync + 'static> Protocol for BTreeMap<K, V> where
K::ReadError: Send,
V::ReadError: Send,
[src]
K::ReadError: Send,
V::ReadError: Send,
type ReadError = MapReadError<K, V>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<K, V>, MapReadError<K, V>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<K, V>, MapReadError<K, V>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<BTreeMap<K, V>, MapReadError<K, V>>
[src]
mut stream: impl Read + 'a
) -> Result<BTreeMap<K, V>, MapReadError<K, V>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl<K: Protocol + Eq + Hash + Send + Sync, V: Protocol + Send + Sync> Protocol for HashMap<K, V> where
K::ReadError: Send,
V::ReadError: Send,
[src]
K::ReadError: Send,
V::ReadError: Send,
type ReadError = MapReadError<K, V>
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<HashMap<K, V>, MapReadError<K, V>>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<HashMap<K, V>, MapReadError<K, V>>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn read_sync<'a>(
mut stream: impl Read + 'a
) -> Result<HashMap<K, V>, MapReadError<K, V>>
[src]
mut stream: impl Read + 'a
) -> Result<HashMap<K, V>, MapReadError<K, V>>
fn write_sync<'a>(&self, mut sink: impl Write + 'a) -> Result<()>
[src]
impl Protocol for Duration
[src]
type ReadError = Error
fn read<'a, R: AsyncRead + Unpin + Send + 'a>(
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<Duration>> + Send + 'a>>
[src]
mut stream: R
) -> Pin<Box<dyn Future<Output = Result<Duration>> + Send + 'a>>
fn write<'a, W: AsyncWrite + Unpin + Send + 'a>(
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
[src]
&'a self,
mut sink: W
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>