Skip to main content

EvalFiber

Struct EvalFiber 

Source
pub struct EvalFiber { /* private fields */ }

Implementations§

Source§

impl EvalFiber

Source

pub fn start_observed( source: &str, env: HashMap<String, Value>, ) -> Result<Self, String>

Creates a live evaluator paused before the first production CPS step.

Source

pub fn start_forms_observed( forms: Vec<Form>, env: HashMap<String, Value>, ) -> Result<Self, String>

Creates a live evaluator paused before evaluating forms without source spans.

Source

pub fn observed_paused(&self) -> bool

Returns true while an observed fiber owns a retained CPS continuation.

Source

pub fn observed_pending_boundaries(&self) -> usize

Returns the number of semantic boundaries retained for host publication.

Source

pub fn step_observed(&mut self) -> EvalFiberState

Executes at most one retained production continuation boundary.

Source

pub fn run_observed(&mut self, boundary_limit: usize) -> EvalFiberState

Runs up to boundary_limit evaluator or queued semantic boundaries.

Source

pub fn resume_observed(&mut self, state: PromiseState) -> EvalFiberState

Applies one real promise settlement without draining later boundaries.

Source§

impl EvalFiber

Source

pub fn snapshot_observed_value(&self, source_id: impl Into<String>) -> Value

Returns a bounded JSON-safe document with default observation limits.

Source

pub fn snapshot_observed_value_with_limits( &self, source_id: impl Into<String>, binding_limit: usize, display_chars: usize, ) -> Value

Returns a bounded JSON-safe document without exposing runtime handles.

Source

pub fn step_observed_value(&mut self, source_id: impl Into<String>) -> Value

Executes one production continuation and returns before/after evidence.

Source

pub fn step_observed_value_with_limits( &mut self, source_id: impl Into<String>, binding_limit: usize, display_chars: usize, ) -> Value

Executes one production continuation with caller-selected evidence bounds.

Source

pub fn resume_observed_value( &mut self, state: PromiseState, source_id: impl Into<String>, ) -> Value

Applies one real promise settlement and returns before/after evidence.

Source

pub fn resume_observed_value_with_limits( &mut self, state: PromiseState, source_id: impl Into<String>, binding_limit: usize, display_chars: usize, ) -> Value

Applies one promise settlement with caller-selected evidence bounds.

Source§

impl EvalFiber

Source

pub fn start(source: &str, env: HashMap<String, Value>) -> Result<Self, String>

Source

pub fn start_forms( forms: Vec<Form>, env: HashMap<String, Value>, ) -> Result<Self, String>

Source

pub fn state(&self) -> EvalFiberState

Source

pub fn pending(&self) -> Option<Promise>

Source

pub fn environment(&self) -> HashMap<String, Value>

Source

pub fn resume(&mut self, state: PromiseState) -> EvalFiberState

Source

pub fn cancel(&mut self) -> bool

Source

pub fn drive_sync(&mut self) -> Result<Value, String>

Trait Implementations§

Source§

impl Drop for EvalFiber

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more