pub struct Codec;Trait Implementations§
Source§impl Codec for Codec
impl Codec for Codec
Source§fn read_response<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
negotiated: &'life1 StreamProtocol,
io: &'life2 mut T,
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
fn read_response<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, negotiated: &'life1 StreamProtocol, io: &'life2 mut T, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
The reader does not know the request kind, so a frame of up to RESPONSE_LIMIT is read first; the 256 KiB inventory bound then applies.
Source§type Protocol = StreamProtocol
type Protocol = StreamProtocol
The type of protocol(s) or protocol versions being negotiated.
Source§fn read_request<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
negotiated: &'life1 StreamProtocol,
io: &'life2 mut T,
) -> Pin<Box<dyn Future<Output = Result<Request>> + Send + 'async_trait>>
fn read_request<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, negotiated: &'life1 StreamProtocol, io: &'life2 mut T, ) -> Pin<Box<dyn Future<Output = Result<Request>> + Send + 'async_trait>>
Reads a request from the given I/O stream according to the
negotiated protocol.
Source§fn write_request<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
negotiated: &'life1 StreamProtocol,
io: &'life2 mut T,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
T: AsyncWrite + Unpin + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_request<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
negotiated: &'life1 StreamProtocol,
io: &'life2 mut T,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
T: AsyncWrite + Unpin + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Writes a request to the given I/O stream according to the
negotiated protocol.
Source§fn write_response<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
negotiated: &'life1 StreamProtocol,
io: &'life2 mut T,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
T: AsyncWrite + Unpin + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_response<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
negotiated: &'life1 StreamProtocol,
io: &'life2 mut T,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
T: AsyncWrite + Unpin + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Writes a response to the given I/O stream according to the
negotiated protocol.
Auto Trait Implementations§
impl Freeze for Codec
impl RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin for Codec
impl UnsafeUnpin for Codec
impl UnwindSafe for Codec
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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