Enum LelumError
pub enum LelumError<'a> {
NodeNotFound {
path: Cow<'a, str>,
},
MissingValue {
path: Cow<'a, str>,
},
ReadOnly {
path: Cow<'a, str>,
},
InvalidValue {
path: Cow<'a, str>,
expected: Option<Cow<'a, str>>,
},
}Expand description
Represents errors returned by Lelum.
Variants§
NodeNotFound
The requested node does not exist.
This can mean either that the path is invalid, or that the node exists but is not of the expected type (e.g., trying to read a branch node).
MissingValue
The data entry exists but has no value.
ReadOnly
The requested data entry is read-only.
InvalidValue
The value provided is invalid.
Implementations§
§impl LelumError<'_>
impl LelumError<'_>
pub fn into_owned(self) -> LelumError<'static>
pub fn into_owned(self) -> LelumError<'static>
Converts the error into an owned version with a static lifetime.
Trait Implementations§
§impl<'a> Debug for LelumError<'a>
impl<'a> Debug for LelumError<'a>
§impl<'de, 'a> Deserialize<'de> for LelumError<'a>where
'de: 'a,
impl<'de, 'a> Deserialize<'de> for LelumError<'a>where
'de: 'a,
§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
§impl Display for LelumError<'_>
impl Display for LelumError<'_>
§impl Error for LelumError<'_>
impl Error for LelumError<'_>
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<'a> Serialize for LelumError<'a>
impl<'a> Serialize for LelumError<'a>
Auto Trait Implementations§
impl<'a> Freeze for LelumError<'a>
impl<'a> RefUnwindSafe for LelumError<'a>
impl<'a> Send for LelumError<'a>
impl<'a> Sync for LelumError<'a>
impl<'a> Unpin for LelumError<'a>
impl<'a> UnwindSafe for LelumError<'a>
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