pub enum FormatError {
ReceivedTextForBinary,
ReceivedBinaryForText,
CantEncodeBinaryAsText,
}
Expand description
Represents formatting errors.
Variants§
ReceivedTextForBinary
Received text for a binary format, e.g. someone sending text on a WebSocket that is using a binary serialization format, like Cbor.
ReceivedBinaryForText
Received binary for a text format, e.g. someone sending binary on a WebSocket that is using a text serialization format, like Json.
CantEncodeBinaryAsText
Trying to encode a binary format as text“, e.g., trying to store a Cbor encoded value in a String.
Trait Implementations§
Source§impl Debug for FormatError
impl Debug for FormatError
Source§impl Display for FormatError
impl Display for FormatError
Source§impl Error for FormatError
impl Error for FormatError
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()
Auto Trait Implementations§
impl Freeze for FormatError
impl RefUnwindSafe for FormatError
impl Send for FormatError
impl Sync for FormatError
impl Unpin for FormatError
impl UnwindSafe for FormatError
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
Source§impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
Source§fn into_opt_prop_value(self) -> Option<V>
fn into_opt_prop_value(self) -> Option<V>
Convert
self
to an optional value of a Properties
struct.Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.