pub struct Ctx<'a> {
pub cfg: EvalCfg,
pub out: &'a mut dyn FnMut(&str),
pub env: &'a mut Env,
pub device: Option<&'a Device>,
}Expand description
Execution context threaded through evaluation.
Fields§
§cfg: EvalCfg§out: &'a mut dyn FnMut(&str)Sink for explicit output (echo, ⎕←). stdout by default per the
sandbox contract; the host may redirect.
env: &'a mut EnvThe names the program has bound so far.
device: Option<&'a Device>Where the run was placed. None is the CPU, which is also what every path that cannot use a device does; only a fused node reads it.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Ctx<'a>
impl<'a> !Send for Ctx<'a>
impl<'a> !Sync for Ctx<'a>
impl<'a> !UnwindSafe for Ctx<'a>
impl<'a> Freeze for Ctx<'a>
impl<'a> Unpin for Ctx<'a>
impl<'a> UnsafeUnpin for Ctx<'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
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