#[non_exhaustive]pub enum UWireError {
BufferTooSmall {
expected: usize,
actual: usize,
},
InvalidPayload(String),
MissingEncoding,
MissingPayload,
UnsupportedEncoding {
expected: Box<PayloadEncoding>,
actual: Box<PayloadEncoding>,
},
SerializationError(String),
}Expand description
Error type used by serialization-neutral payload helpers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BufferTooSmall
A caller-provided output buffer is too small for the serialized payload.
InvalidPayload(String)
Payload bytes are malformed for the selected decoder.
MissingEncoding
A typed decode was requested, but the frame has no payload encoding.
MissingPayload
A typed decode was requested, but the frame has no payload bytes.
UnsupportedEncoding
The frame’s encoding is not compatible with the selected payload codec.
Fields
§
expected: Box<PayloadEncoding>Encoding declared by the requested codec.
§
actual: Box<PayloadEncoding>Encoding carried by the frame being decoded.
SerializationError(String)
Serializer or deserializer implementation failed.
Implementations§
Source§impl UWireError
impl UWireError
Sourcepub fn buffer_too_small(expected: usize, actual: usize) -> Self
pub fn buffer_too_small(expected: usize, actual: usize) -> Self
Creates a UWireError::BufferTooSmall value.
Sourcepub fn invalid_payload(message: impl Into<String>) -> Self
pub fn invalid_payload(message: impl Into<String>) -> Self
Creates a UWireError::InvalidPayload value.
Sourcepub fn invalid_payload_length(expected: usize, actual: usize) -> Self
pub fn invalid_payload_length(expected: usize, actual: usize) -> Self
Creates a stable payload length error.
Sourcepub fn serialization_error(message: impl Into<String>) -> Self
pub fn serialization_error(message: impl Into<String>) -> Self
Creates a UWireError::SerializationError value.
Trait Implementations§
Source§impl Clone for UWireError
impl Clone for UWireError
Source§fn clone(&self) -> UWireError
fn clone(&self) -> UWireError
Returns a copy of the value. Read more
1.0.0 · 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 UWireError
impl Debug for UWireError
Source§impl Display for UWireError
impl Display for UWireError
Source§impl Error for UWireError
impl Error for UWireError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<UWireError> for UStatus
impl From<UWireError> for UStatus
Source§fn from(value: UWireError) -> Self
fn from(value: UWireError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UWireError
impl PartialEq for UWireError
impl Eq for UWireError
impl StructuralPartialEq for UWireError
Auto Trait Implementations§
impl Freeze for UWireError
impl RefUnwindSafe for UWireError
impl Send for UWireError
impl Sync for UWireError
impl Unpin for UWireError
impl UnwindSafe for UWireError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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<TCore> UWithNativePrefixWire for TCore
impl<TCore> UWithNativePrefixWire for TCore
Source§fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
Wraps this core with an external or custom selected wire using canonical metadata.
Source§fn into_protobuf_transport(
self,
) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
fn into_protobuf_transport( self, ) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
Wraps this core with the Protocol Buffers selected-wire profile.
Source§fn into_stable_container_transport(
self,
) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
fn into_stable_container_transport( self, ) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
Wraps this core with the stable-container selected-wire profile.