pub enum CidError {
TooLong {
len: usize,
max: usize,
},
InvalidChar {
ch: char,
charset: Charset,
},
NotLossless,
}Expand description
Why a CidCodec cannot encode or accept a cid.
These are setup problems of a codec, found by the connector at start, so they are reported as
Error::Config.
Variants§
TooLong
The encoded string is longer than the broker’s field.
Fields
§
max: usizeLongest string the field takes, see CidCaps::max_len.
InvalidChar
The encoded string has a character the broker’s field does not accept.
NotLossless
The codec cannot give the UUID back from the native form, but the connector needs that.
Trait Implementations§
impl Eq for CidError
Source§impl Error for CidError
impl Error for CidError
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()
impl StructuralPartialEq for CidError
Auto Trait Implementations§
impl Freeze for CidError
impl RefUnwindSafe for CidError
impl Send for CidError
impl Sync for CidError
impl Unpin for CidError
impl UnsafeUnpin for CidError
impl UnwindSafe for CidError
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