pub struct EvalContext<'a> {
pub session: SessionId,
pub node_id: usize,
pub symbols: &'a SymbolValues,
pub scenario: Option<usize>,
pub shared: Option<&'a TurnShared>,
pub seating: &'a Seating,
}Expand description
Everything an op is given about where and when it is being evaluated. Ops
receive it by shared reference: they can read the turn’s symbols and the
installed shared resources, and they can identify themselves with
(session, node_id), but they cannot reach another node’s values or rebind a
symbol.
Fields§
§session: SessionId§node_id: usize§symbols: &'a SymbolValues§scenario: Option<usize>§seating: &'a SeatingWhich lane each seat of this turn carries. A turn one stream owns is
Seating::single, so an op reads the same field either way.
Implementations§
Source§impl EvalContext<'static>
impl EvalContext<'static>
Sourcepub fn out_of_plan() -> EvalContext<'static>
pub fn out_of_plan() -> EvalContext<'static>
Context for evaluating outside any plan – const folding and shape
inference. What EvalOp::eval_out_of_plan hands the op: no symbol is
bound and no shared resource is reachable.
Trait Implementations§
Source§impl<'a> Clone for EvalContext<'a>
impl<'a> Clone for EvalContext<'a>
Source§fn clone(&self) -> EvalContext<'a>
fn clone(&self) -> EvalContext<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for EvalContext<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EvalContext<'a>
impl<'a> !Send for EvalContext<'a>
impl<'a> !Sync for EvalContext<'a>
impl<'a> !UnwindSafe for EvalContext<'a>
impl<'a> Freeze for EvalContext<'a>
impl<'a> Unpin for EvalContext<'a>
impl<'a> UnsafeUnpin for EvalContext<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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