pub struct OptionalCompilerObserver<'o>(pub Option<&'o mut dyn CompilerObserver>);Expand description
Compiler observer that is optimised for the case where no observer is being used.
The trait RuntimeObserver is implemented on the Optional
Tuple Fields§
§0: Option<&'o mut dyn CompilerObserver>Trait Implementations§
Source§impl<'o> CompilerObserver for OptionalCompilerObserver<'o>
impl<'o> CompilerObserver for OptionalCompilerObserver<'o>
Source§fn observe_compiled_toplevel(&mut self, lambda: &Rc<Lambda>)
fn observe_compiled_toplevel(&mut self, lambda: &Rc<Lambda>)
Called when the compiler finishes compilation of the top-level
of an expression (usually the root Nix expression of a file).
Source§fn observe_compiled_lambda(&mut self, lambda: &Rc<Lambda>)
fn observe_compiled_lambda(&mut self, lambda: &Rc<Lambda>)
Called when the compiler finishes compilation of a
user-defined function. Read more
Source§fn observe_compiled_thunk(&mut self, lambda: &Rc<Lambda>)
fn observe_compiled_thunk(&mut self, lambda: &Rc<Lambda>)
Called when the compiler finishes compilation of a thunk.
Source§impl<'o> Default for OptionalCompilerObserver<'o>
impl<'o> Default for OptionalCompilerObserver<'o>
Source§fn default() -> OptionalCompilerObserver<'o>
fn default() -> OptionalCompilerObserver<'o>
Returns the “default value” for a type. Read more
Source§impl<'o> From<&'o mut dyn CompilerObserver> for OptionalCompilerObserver<'o>
impl<'o> From<&'o mut dyn CompilerObserver> for OptionalCompilerObserver<'o>
Source§fn from(val: &'o mut dyn CompilerObserver) -> Self
fn from(val: &'o mut dyn CompilerObserver) -> Self
Converts to this type from the input type.
Source§impl<'o> From<Option<&'o mut dyn CompilerObserver>> for OptionalCompilerObserver<'o>
impl<'o> From<Option<&'o mut dyn CompilerObserver>> for OptionalCompilerObserver<'o>
Source§fn from(val: Option<&'o mut dyn CompilerObserver>) -> Self
fn from(val: Option<&'o mut dyn CompilerObserver>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'o> Freeze for OptionalCompilerObserver<'o>
impl<'o> !RefUnwindSafe for OptionalCompilerObserver<'o>
impl<'o> !Send for OptionalCompilerObserver<'o>
impl<'o> !Sync for OptionalCompilerObserver<'o>
impl<'o> Unpin for OptionalCompilerObserver<'o>
impl<'o> !UnwindSafe for OptionalCompilerObserver<'o>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> 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