pub struct LookupError<E> {
pub var_name: String,
pub cause: E,
}Expand description
Represents a variable lookup error.
This error is returned by env_with_context() function (and, therefore, also by env(),
full_with_context() and full()) when the provided context function returns an error. The
original error is provided in the cause field, while name contains the name of a variable
whose expansion caused the error.
Fields§
§var_name: StringThe name of the problematic variable inside the input string.
cause: EThe original error returned by the context function.
Trait Implementations§
Source§impl<E> Clone for LookupError<E>where
E: Clone,
impl<E> Clone for LookupError<E>where
E: Clone,
Source§fn clone(&self) -> LookupError<E>
fn clone(&self) -> LookupError<E>
Returns a duplicate 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<E> Debug for LookupError<E>where
E: Debug,
impl<E> Debug for LookupError<E>where
E: Debug,
Source§impl<E> Display for LookupError<E>where
E: Display,
impl<E> Display for LookupError<E>where
E: Display,
Source§impl<E> Error for LookupError<E>where
E: Error,
impl<E> Error for LookupError<E>where
E: Error,
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl<E> PartialEq for LookupError<E>where
E: PartialEq,
impl<E> PartialEq for LookupError<E>where
E: PartialEq,
impl<E> Eq for LookupError<E>where
E: Eq,
impl<E> StructuralPartialEq for LookupError<E>
Auto Trait Implementations§
impl<E> Freeze for LookupError<E>where
E: Freeze,
impl<E> RefUnwindSafe for LookupError<E>where
E: RefUnwindSafe,
impl<E> Send for LookupError<E>where
E: Send,
impl<E> Sync for LookupError<E>where
E: Sync,
impl<E> Unpin for LookupError<E>where
E: Unpin,
impl<E> UnwindSafe for LookupError<E>where
E: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more