pub enum CodecDirection {
Encode,
Decode,
RoundTrip,
}Expand description
Which of the two roads a request covers.
Variants§
Encode
Typed value to canonical bytes.
Decode
Canonical bytes to typed value.
RoundTrip
Both, so neither can drift from the other.
Implementations§
Source§impl CodecDirection
impl CodecDirection
Sourcepub const fn writes(self) -> bool
pub const fn writes(self) -> bool
Whether this direction covers the road that writes canonical bytes.
Sourcepub const fn reads(self) -> bool
pub const fn reads(self) -> bool
Whether this direction covers the road that reads them back.
§Nonclaims
A direction that does not cover it delivers no reader, and that is a stated posture rather than a rendering that fell short: “a codec that refuses on decode is the validator” says exactly as much about the codec that has no decode road.
Trait Implementations§
Source§impl Clone for CodecDirection
impl Clone for CodecDirection
Source§fn clone(&self) -> CodecDirection
fn clone(&self) -> CodecDirection
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 moreimpl Copy for CodecDirection
Source§impl Debug for CodecDirection
impl Debug for CodecDirection
impl Eq for CodecDirection
Source§impl Hash for CodecDirection
impl Hash for CodecDirection
Source§impl PartialEq for CodecDirection
impl PartialEq for CodecDirection
impl StructuralPartialEq for CodecDirection
Auto Trait Implementations§
impl Freeze for CodecDirection
impl RefUnwindSafe for CodecDirection
impl Send for CodecDirection
impl Sync for CodecDirection
impl Unpin for CodecDirection
impl UnsafeUnpin for CodecDirection
impl UnwindSafe for CodecDirection
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