Struct tofuri_p2p::behaviour::SyncCodec
source · pub struct SyncCodec();Trait Implementations§
source§impl RequestResponseCodec for SyncCodec
impl RequestResponseCodec for SyncCodec
§type Protocol = SyncProtocol
type Protocol = SyncProtocol
The type of protocol(s) or protocol versions being negotiated.
§type Request = SyncRequest
type Request = SyncRequest
The type of inbound and outbound requests.
§type Response = SyncResponse
type Response = SyncResponse
The type of inbound and outbound responses.
source§fn read_request<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
_: &'life1 SyncProtocol,
io: &'life2 mut T
) -> Pin<Box<dyn Future<Output = Result<Self::Request>> + Send + 'async_trait>>where
T: 'async_trait + AsyncRead + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_request<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, _: &'life1 SyncProtocol, io: &'life2 mut T ) -> Pin<Box<dyn Future<Output = Result<Self::Request>> + Send + 'async_trait>>where T: 'async_trait + AsyncRead + Unpin + Send, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Reads a request from the given I/O stream according to the
negotiated protocol.
source§fn read_response<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
_: &'life1 SyncProtocol,
io: &'life2 mut T
) -> Pin<Box<dyn Future<Output = Result<Self::Response>> + Send + 'async_trait>>where
T: 'async_trait + AsyncRead + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_response<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, _: &'life1 SyncProtocol, io: &'life2 mut T ) -> Pin<Box<dyn Future<Output = Result<Self::Response>> + Send + 'async_trait>>where T: 'async_trait + AsyncRead + Unpin + Send, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Reads a response from the given I/O stream according to the
negotiated protocol.
source§fn write_request<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
_: &'life1 SyncProtocol,
io: &'life2 mut T,
__arg3: SyncRequest
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
T: 'async_trait + AsyncWrite + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_request<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, _: &'life1 SyncProtocol, io: &'life2 mut T, __arg3: SyncRequest ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where T: 'async_trait + AsyncWrite + Unpin + Send, 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,
_: &'life1 SyncProtocol,
io: &'life2 mut T,
__arg3: SyncResponse
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
T: 'async_trait + AsyncWrite + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_response<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, _: &'life1 SyncProtocol, io: &'life2 mut T, __arg3: SyncResponse ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where T: 'async_trait + AsyncWrite + Unpin + Send, 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.