pub enum ParseError<T> {
YDB(YDBError),
Utf8(FromUtf8Error),
Parse(T, String),
}
Expand description
The error type returned by KeyContext::get_and_parse()
Variants§
YDB(YDBError)
There was an error retrieving the value from the database.
Utf8(FromUtf8Error)
Retrieving the value succeeded, but it was not a valid String
.
The bytes of the value are still available using .into_bytes()
.
Parse(T, String)
A valid String
was retrieved but did not parse successfully.
The String
is still available.
The T
is the type of FromStr::Err
for the value being parsed.
Trait Implementations§
Source§impl<T: Debug> Debug for ParseError<T>
impl<T: Debug> Debug for ParseError<T>
Source§impl<T: Display> Display for ParseError<T>
impl<T: Display> Display for ParseError<T>
Source§impl<T: Error + 'static> Error for ParseError<T>
impl<T: Error + 'static> Error for ParseError<T>
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<T> Freeze for ParseError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ParseError<T>where
T: RefUnwindSafe,
impl<T> Send for ParseError<T>where
T: Send,
impl<T> Sync for ParseError<T>where
T: Sync,
impl<T> Unpin for ParseError<T>where
T: Unpin,
impl<T> UnwindSafe for ParseError<T>where
T: UnwindSafe,
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