pub struct SyncOpCodec;Expand description
The libp2p request-response wire codec for op transfer: length-prefixed plain-CBOR (ciborium). Mirrors
super::protocol::QualiaSyncCodec’s framing (4-byte big-endian length + body), without the Q42
CBOR-LD term-compaction (the payload is opaque operation bytes, so there is nothing to term-compact).
Trait Implementations§
Source§impl Clone for SyncOpCodec
impl Clone for SyncOpCodec
Source§fn clone(&self) -> SyncOpCodec
fn clone(&self) -> SyncOpCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Codec for SyncOpCodec
impl Codec for SyncOpCodec
Source§type Request = SyncOpRequest
type Request = SyncOpRequest
The type of inbound and outbound requests.
Source§type Response = SyncOpResponse
type Response = SyncOpResponse
The type of inbound and outbound responses.
Source§fn read_request<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 mut self,
_: &'life1 StreamProtocol,
io: &'life2 mut T,
) -> Pin<Box<dyn Future<Output = Result<SyncOpRequest>> + Send + 'async_trait>>
fn read_request<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, _: &'life1 StreamProtocol, io: &'life2 mut T, ) -> Pin<Box<dyn Future<Output = Result<SyncOpRequest>> + Send + '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 StreamProtocol,
io: &'life2 mut T,
) -> Pin<Box<dyn Future<Output = Result<SyncOpResponse>> + Send + 'async_trait>>
fn read_response<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, _: &'life1 StreamProtocol, io: &'life2 mut T, ) -> Pin<Box<dyn Future<Output = Result<SyncOpResponse>> + Send + '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 StreamProtocol,
io: &'life2 mut T,
req: SyncOpRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn write_request<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, _: &'life1 StreamProtocol, io: &'life2 mut T, req: SyncOpRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '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 StreamProtocol,
io: &'life2 mut T,
res: SyncOpResponse,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn write_response<'life0, 'life1, 'life2, 'async_trait, T>( &'life0 mut self, _: &'life1 StreamProtocol, io: &'life2 mut T, res: SyncOpResponse, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Writes a response to the given I/O stream according to the
negotiated protocol.
Source§impl Default for SyncOpCodec
impl Default for SyncOpCodec
Source§fn default() -> SyncOpCodec
fn default() -> SyncOpCodec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SyncOpCodec
impl RefUnwindSafe for SyncOpCodec
impl Send for SyncOpCodec
impl Sync for SyncOpCodec
impl Unpin for SyncOpCodec
impl UnsafeUnpin for SyncOpCodec
impl UnwindSafe for SyncOpCodec
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.