Struct shellexpand::LookupError
source · [−]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: String
The name of the problematic variable inside the input string.
cause: E
The original error returned by the context function.
Trait Implementations
sourceimpl<E: Clone> Clone for LookupError<E>
impl<E: Clone> Clone for LookupError<E>
sourcefn clone(&self) -> LookupError<E>
fn clone(&self) -> LookupError<E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<E: Debug> Debug for LookupError<E>
impl<E: Debug> Debug for LookupError<E>
sourceimpl<E: Display> Display for LookupError<E>
impl<E: Display> Display for LookupError<E>
sourceimpl<E: Error + 'static> Error for LookupError<E>
impl<E: Error + 'static> Error for LookupError<E>
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<E: PartialEq> PartialEq<LookupError<E>> for LookupError<E>
impl<E: PartialEq> PartialEq<LookupError<E>> for LookupError<E>
sourcefn eq(&self, other: &LookupError<E>) -> bool
fn eq(&self, other: &LookupError<E>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LookupError<E>) -> bool
fn ne(&self, other: &LookupError<E>) -> bool
This method tests for !=
.
impl<E: Eq> Eq for LookupError<E>
impl<E> StructuralEq for LookupError<E>
impl<E> StructuralPartialEq for LookupError<E>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more