pub struct ArcOrElse<'db> {
data: Arc<dyn OrElse<'db> + 'db>,
}Expand description
See OrElse::to_arc.
Fields§
§data: Arc<dyn OrElse<'db> + 'db>Trait Implementations§
Source§impl<'db> OrElse<'db> for ArcOrElse<'db>
impl<'db> OrElse<'db> for ArcOrElse<'db>
Source§fn or_else(&self, env: &mut Env<'db>, because: Because<'db>) -> Diagnostic
fn or_else(&self, env: &mut Env<'db>, because: Because<'db>) -> Diagnostic
Create a diagnostic representing the error. Read more
Source§fn to_arc(&self) -> ArcOrElse<'db>
fn to_arc(&self) -> ArcOrElse<'db>
Convert a
&dyn OrElse<'db> into an ArcOrElse<'db> so that it can be
stored in an InferenceVarData
or otherwise preserved beyond the current stack frame.
See the trait comment for more details.Source§fn compiler_location(&self) -> &'static Location<'static>
fn compiler_location(&self) -> &'static Location<'static>
Returns the location in the compiler source where this
or_else was created.
Useful for debugging.Auto Trait Implementations§
impl<'db> Freeze for ArcOrElse<'db>
impl<'db> !RefUnwindSafe for ArcOrElse<'db>
impl<'db> !Send for ArcOrElse<'db>
impl<'db> !Sync for ArcOrElse<'db>
impl<'db> Unpin for ArcOrElse<'db>
impl<'db> UnsafeUnpin for ArcOrElse<'db>
impl<'db> !UnwindSafe for ArcOrElse<'db>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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