pub struct MissingContextError<'c> {
span: Span,
error_handler: &'c (dyn Fn(Span) -> Error + 'c),
}Expand description
Cheap type that embodies a failed requirement for a driver
This can be pre-obtained and bound to a local ctx, and then
converted conveniently to syn::Error with ctx? when actually
needed.
Fields§
§span: Span§error_handler: &'c (dyn Fn(Span) -> Error + 'c)Trait Implementations§
Source§impl<'c> Clone for MissingContextError<'c>
impl<'c> Clone for MissingContextError<'c>
Source§fn clone(&self) -> MissingContextError<'c>
fn clone(&self) -> MissingContextError<'c>
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<'c> From<MissingContextError<'c>> for Error
impl<'c> From<MissingContextError<'c>> for Error
Source§fn from(e: MissingContextError<'c>) -> Error
fn from(e: MissingContextError<'c>) -> Error
Converts to this type from the input type.
impl<'c> Copy for MissingContextError<'c>
Auto Trait Implementations§
impl<'c> Freeze for MissingContextError<'c>
impl<'c> !RefUnwindSafe for MissingContextError<'c>
impl<'c> !Send for MissingContextError<'c>
impl<'c> !Sync for MissingContextError<'c>
impl<'c> Unpin for MissingContextError<'c>
impl<'c> !UnwindSafe for MissingContextError<'c>
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<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