pub struct RuntimeContext { /* private fields */ }Expand description
Complete explicit runtime authority for one session/invocation tree.
Implementations§
Source§impl RuntimeContext
impl RuntimeContext
pub fn new(execution: Rc<dyn RuntimeExecutionServices>) -> Self
pub fn with_cancellation( execution: Rc<dyn RuntimeExecutionServices>, cancellation: Arc<AtomicBool>, ) -> Self
pub fn execution(&self) -> &Rc<dyn RuntimeExecutionServices>
pub fn service_ports(&self) -> &RuntimeServicePorts
pub fn cancellation(&self) -> Arc<AtomicBool> ⓘ
pub fn program_revision(&self) -> Option<&ProgramRevision>
pub fn with_program_revision(self, revision: Option<ProgramRevision>) -> Self
pub fn with_execution(self, execution: Rc<dyn RuntimeExecutionServices>) -> Self
pub fn with_search_path(self, search_path: Arc<SearchPath>) -> Self
pub fn search_path(&self) -> Option<&Arc<SearchPath>>
pub fn set_dynamic_function_loader( &self, loader: Option<Arc<DynamicFunctionLoader>>, )
pub fn runmat_extensions_enabled(&self) -> bool
pub fn set_runmat_extensions_enabled(&self, enabled: bool)
pub fn language_mode(&self) -> RuntimeLanguageMode
pub fn set_language_mode(&self, mode: RuntimeLanguageMode)
pub fn top_level_await_enabled(&self) -> bool
pub fn set_top_level_await_enabled(&self, enabled: bool)
pub fn dynamic_eval_enabled(&self) -> bool
pub fn set_dynamic_eval_enabled(&self, enabled: bool)
pub fn callstack_limit(&self) -> usize
pub fn set_callstack_limit(&self, limit: usize)
pub fn error_namespace(&self) -> String
pub fn set_error_namespace(&self, namespace: impl Into<String>)
pub fn with_service_ports(self, services: RuntimeServicePorts) -> Self
Sourcepub fn scope<F: Future>(&self, future: F) -> ContextFuture<F> ⓘ
pub fn scope<F: Future>(&self, future: F) -> ContextFuture<F> ⓘ
Scope every poll of future to this context. This is the supported
bridge for async code that still reaches ambient compatibility APIs.
Sourcepub fn enter(&self) -> RuntimeContextGuard
pub fn enter(&self) -> RuntimeContextGuard
Activate this context for one synchronous executor or foreign-host
extent. Async code should use Self::scope so the context is removed
across yields.
Trait Implementations§
Source§impl Clone for RuntimeContext
impl Clone for RuntimeContext
Source§fn clone(&self) -> RuntimeContext
fn clone(&self) -> RuntimeContext
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for RuntimeContext
impl !Send for RuntimeContext
impl !Sync for RuntimeContext
impl !UnwindSafe for RuntimeContext
impl Freeze for RuntimeContext
impl Unpin for RuntimeContext
impl UnsafeUnpin for RuntimeContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.