pub struct EvaluationContext<'a, T = ()> {
pub compilation_unit: &'a CompilationUnit,
pub current_sub_component: Option<SubComponentIdx>,
pub current_global: Option<GlobalIdx>,
pub generator_state: T,
pub parent: Option<ParentCtx<'a, T>>,
pub argument_types: &'a [Type],
}
Fields§
§compilation_unit: &'a CompilationUnit
§current_sub_component: Option<SubComponentIdx>
§current_global: Option<GlobalIdx>
§generator_state: T
§parent: Option<ParentCtx<'a, T>>
The repeater parent
argument_types: &'a [Type]
The callback argument types
Implementations§
Source§impl<'a, T> EvaluationContext<'a, T>
impl<'a, T> EvaluationContext<'a, T>
pub fn new_sub_component( compilation_unit: &'a CompilationUnit, sub_component: SubComponentIdx, generator_state: T, parent: Option<ParentCtx<'a, T>>, ) -> Self
pub fn new_global( compilation_unit: &'a CompilationUnit, global: GlobalIdx, generator_state: T, ) -> Self
pub fn current_sub_component(&self) -> Option<&SubComponent>
pub fn current_global(&self) -> Option<&GlobalComponent>
Trait Implementations§
Source§impl<'a, T: Clone> Clone for EvaluationContext<'a, T>
impl<'a, T: Clone> Clone for EvaluationContext<'a, T>
Source§fn clone(&self) -> EvaluationContext<'a, T>
fn clone(&self) -> EvaluationContext<'a, T>
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<T> TypeResolutionContext for EvaluationContext<'_, T>
impl<T> TypeResolutionContext for EvaluationContext<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for EvaluationContext<'a, T>where
T: Freeze,
impl<'a, T = ()> !RefUnwindSafe for EvaluationContext<'a, T>
impl<'a, T = ()> !Send for EvaluationContext<'a, T>
impl<'a, T = ()> !Sync for EvaluationContext<'a, T>
impl<'a, T> Unpin for EvaluationContext<'a, T>where
T: Unpin,
impl<'a, T = ()> !UnwindSafe for EvaluationContext<'a, T>
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