pub struct ExecState { /* private fields */ }Expand description
State for executing a program.
Implementations§
Source§impl ExecState
impl ExecState
pub fn new(exec_context: &ExecutorContext) -> Self
pub fn new_sketch_mode( exec_context: &ExecutorContext, mock_config: &MockConfig, ) -> Self
Sourcepub fn err(&mut self, e: CompilationError)
pub fn err(&mut self, e: CompilationError)
Log a non-fatal error.
Sourcepub fn warn(&mut self, e: CompilationError, name: &'static str)
pub fn warn(&mut self, e: CompilationError, name: &'static str)
Log a warning.
pub fn warn_experimental( &mut self, feature_name: &str, source_range: SourceRange, )
pub fn clear_units_warnings(&mut self, source_range: &SourceRange)
pub fn errors(&self) -> &[CompilationError]
Sourcepub async fn into_exec_outcome(
self,
main_ref: EnvironmentRef,
ctx: &ExecutorContext,
) -> ExecOutcome
pub async fn into_exec_outcome( self, main_ref: EnvironmentRef, ctx: &ExecutorContext, ) -> ExecOutcome
Convert to execution outcome when running in WebAssembly. We want to reduce the amount of data that crosses the WASM boundary as much as possible.
pub fn next_object_id(&mut self) -> ObjectId
pub fn next_uuid(&mut self) -> Uuid
pub fn id_generator(&mut self) -> &mut IdGenerator
pub fn get_module(&mut self, id: ModuleId) -> Option<&ModuleInfo>
pub fn current_default_units(&self) -> NumericType
pub fn length_unit(&self) -> UnitLength
pub fn angle_unit(&self) -> UnitAngle
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecState
impl !RefUnwindSafe for ExecState
impl Send for ExecState
impl Sync for ExecState
impl Unpin for ExecState
impl !UnwindSafe for ExecState
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> 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> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§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,
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.