pub struct ProtocolErrorEnvelope { /* private fields */ }Expand description
Versioned protocol-error transport envelope.
Implementations§
Source§impl ProtocolErrorEnvelope
impl ProtocolErrorEnvelope
Sourcepub const fn new(error: ProtocolError) -> Self
pub const fn new(error: ProtocolError) -> Self
Wraps an error in the current protocol envelope.
Sourcepub const fn protocol_version(&self) -> ProtocolVersion
pub const fn protocol_version(&self) -> ProtocolVersion
Returns the envelope protocol version.
Sourcepub const fn error(&self) -> &ProtocolError
pub const fn error(&self) -> &ProtocolError
Returns the safe error payload.
Trait Implementations§
Source§impl Clone for ProtocolErrorEnvelope
impl Clone for ProtocolErrorEnvelope
Source§fn clone(&self) -> ProtocolErrorEnvelope
fn clone(&self) -> ProtocolErrorEnvelope
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 Debug for ProtocolErrorEnvelope
impl Debug for ProtocolErrorEnvelope
Source§impl<'de> Deserialize<'de> for ProtocolErrorEnvelope
impl<'de> Deserialize<'de> for ProtocolErrorEnvelope
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProtocolErrorEnvelope
impl PartialEq for ProtocolErrorEnvelope
Source§impl Serialize for ProtocolErrorEnvelope
impl Serialize for ProtocolErrorEnvelope
impl StructuralPartialEq for ProtocolErrorEnvelope
Auto Trait Implementations§
impl Freeze for ProtocolErrorEnvelope
impl RefUnwindSafe for ProtocolErrorEnvelope
impl Send for ProtocolErrorEnvelope
impl Sync for ProtocolErrorEnvelope
impl Unpin for ProtocolErrorEnvelope
impl UnsafeUnpin for ProtocolErrorEnvelope
impl UnwindSafe for ProtocolErrorEnvelope
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