pub struct FlowInstance { /* private fields */ }Expand description
The runtime types that appear in bevy-brink’s own public signatures,
re-exported so consumers can name them without depending on brink-runtime:
FlowInstance, Program,
Choice, Step’s
return, RuntimeError’s error,
FallbackHandler for the “no bindings” advance path, the scoped
story-state types a host needs to build a policy and a per-step routing
view (see docs/scoped-flow-state-spec.md): WorldPolicy, Scope,
PolicyError, and ContextView (usually built via
flow_context_view instead of by hand) — and the per-entity durability
types produced/consumed by BrinkGlobals::save_state/load_state and
save_flow_state/load_flow_state (F6.3, see the globals module’s
“Save/load” docs): SaveState and LoadReport.
World is deliberately absent here — it collides with bevy::prelude::World
under a glob import, so it is re-exported under the alias BrinkWorld.
A single independent execution context within a story. The default flow
runs from the root container; named flows can be spawned at arbitrary
entry points via FlowInstance::new_at.
A FlowInstance is opaque from outside the crate: its internal fields
(flow, status, stats) are crate-private, but consumers can hold,
clone, serialize, and pass &mut FlowInstance to the runtime’s step
functions. Use the inherent methods (step_single_line,
choose, transcript,
status, etc.) for all interaction.
Implementations§
Source§impl FlowInstance
impl FlowInstance
Sourcepub const LINE_LIMIT: usize = 10_000
pub const LINE_LIMIT: usize = 10_000
Maximum lines produced by a single drive_to_terminal
call before erroring. Safety net against infinite loops from
malformed bytecode.
Sourcepub fn new_at_root(program: &Program) -> (FlowInstance, World)
pub fn new_at_root(program: &Program) -> (FlowInstance, World)
Create a new flow instance starting at the program’s root container,
along with a fresh World initialized from the program’s global
defaults.
Sourcepub fn new_at(program: &Program, container_idx: u32) -> (FlowInstance, World)
pub fn new_at(program: &Program, container_idx: u32) -> (FlowInstance, World)
Create a new flow instance starting at an arbitrary container index,
along with a fresh World. Use this to spawn a named flow at a
specific entry point. The caller is responsible for deciding whether
to share the returned World with other flows or discard it and
reuse an existing one.
Sourcepub fn set_visibility_enforcement(&mut self, enforce: bool)
pub fn set_visibility_enforcement(&mut self, enforce: bool)
Enable or disable host visibility enforcement on this flow instance
(M-2b, docs/modules-spec.md §4 boundary rule 3). Enforcement is
on by default: choose_path_string/
choose_path_string_with_args
into a #@private knot/stitch, and
begin_function_eval/
begin_function_value_eval of a
#@private function, return RuntimeError::PrivateAccess.
This mirrors Story::set_visibility_enforcement
for consumers that drive a FlowInstance directly — bevy-brink’s
per-entity orchestration and crate::Speculation — rather than
through a Story. A Story keeps every
FlowInstance it owns synced to its own flag when this is called on
the Story, so callers that only ever go through Story never need
to call this directly.
Sourcepub fn visibility_enforced(&self) -> bool
pub fn visibility_enforced(&self) -> bool
Whether host visibility enforcement is currently on for this flow
instance (default true).
Sourcepub fn set_exec_mode(&mut self, mode: ExecMode)
pub fn set_exec_mode(&mut self, mode: ExecMode)
Set the dev/prod execution mode on this flow instance (NS-A4,
ExecMode — see its docs for the §4b doctrine). Mirrors
Story::set_exec_mode for consumers
that drive a FlowInstance directly (bevy-brink,
crate::Speculation). Takes effect immediately — the mode is
consulted at each ordering-verb execution.
Sourcepub fn step_single_line<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
) -> Result<Step, RuntimeError>where
R: StoryRng,
pub fn step_single_line<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
) -> Result<Step, RuntimeError>where
R: StoryRng,
Execute until one complete line of output is available, or until a yield point (choices/done/ended) if no newline occurs first.
Returns a Step telling the caller what happened (Line/Done/
Choices/End). This is the simple API for consumers whose
external handler never defers: if the handler returns
ExternalResult::Pending, this errors with
UnresolvedExternalCall.
For pausable world-access bindings, use advance.
Sourcepub fn drive_to_terminal<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
) -> Result<Vec<Step>, RuntimeError>where
R: StoryRng,
pub fn drive_to_terminal<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
) -> Result<Vec<Step>, RuntimeError>where
R: StoryRng,
Step this flow forward until the next terminal step (Done,
Choices, or End), collecting every Step produced along the
way.
This is the single Layer-2 “drive to terminal” loop: [Story]’s
continue_maximally* family is a thin wrapper over it, and any other
holder of a FlowInstance (e.g. an engine integration like
bevy-brink) should reach for this instead of hand-rolling the same
loop. Semantics:
- Steps via
step_single_line: a deferred external (ExternalResult::Pending) is not paused on here — it errors withRuntimeError::UnresolvedExternalCall, exactly asstep_single_linedoes. Callers that need to pause on world-access externals mid-drive should driveadvancethemselves rather than use this method. - Stops at the first
Stepfor whichStep::is_terminalreturnstrue; that step is always the last element of the returnedVec, and every element before it is aStep::Line. - Bounded by
Self::LINE_LIMIT(10,000) lines produced in a single call; exceeding it returnsRuntimeError::LineLimitExceededrather than looping forever.
§Errors
Any error step_single_line itself can
produce, plus RuntimeError::LineLimitExceeded if the drive
produces Self::LINE_LIMIT lines without reaching a terminal one.
Sourcepub fn drive<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
budget: &mut usize,
) -> Result<DriveOutcome, RuntimeError>where
R: StoryRng,
pub fn drive<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
budget: &mut usize,
) -> Result<DriveOutcome, RuntimeError>where
R: StoryRng,
The pausable Layer-2 “drive to terminal or external pause” op:
drive_to_terminal’s sibling for callers
(e.g. bevy-brink) whose external bindings need to pause mid-drive
for out-of-band (world-access) resolution rather than erroring.
Steps via advance instead of
step_single_line: a deferred external
yields DriveOutcome::AwaitingExternal (carrying every line
produced so far this call) instead of
RuntimeError::UnresolvedExternalCall. Resolve it and call drive
again to continue — the drive is logically one operation spanning
however many pauses it takes.
budget is the caller-owned line budget for that whole logical
operation: each line drive produces (whether the call ends in
Terminal or AwaitingExternal) decrements it by one, and it is
not reset between calls — the caller passes the same &mut usize back in on resume, so a drive spanning many external pauses
still has exactly one bound on total output, not a fresh
Self::LINE_LIMIT per resume (see the “guard against unbounded
growth” rule). Start a fresh logical drive with a fresh
budget = FlowInstance::LINE_LIMIT (or any caller-chosen cap).
Like drive_to_terminal, the terminal step is always the last
element of the returned Vec and every step before it is
Step::Line.
§Errors
Any error advance itself can produce, plus
RuntimeError::LineLimitExceeded if budget reaches zero before a
terminal step is produced.
Sourcepub fn advance<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
) -> Result<StepOutcome, RuntimeError>where
R: StoryRng,
pub fn advance<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
) -> Result<StepOutcome, RuntimeError>where
R: StoryRng,
Like step_single_line, but surfaces a
deferred external (ExternalResult::Pending) as
StepOutcome::AwaitingExternal instead of an error — so a
world-access binding hit during normal playback can pause cleanly.
Resolve the pending external and call advance again to continue.
Sourcepub fn choose(
&mut self,
context: &mut (impl ContextAccess + ?Sized),
index: usize,
) -> Result<(), RuntimeError>
pub fn choose( &mut self, context: &mut (impl ContextAccess + ?Sized), index: usize, ) -> Result<(), RuntimeError>
Select a choice by index. Call step_single_line
afterward to continue execution from the chosen branch.
Sourcepub fn choose_path_string(
&mut self,
program: &Program,
context: &mut (impl ContextAccess + ?Sized),
path: &str,
) -> Result<(), RuntimeError>
pub fn choose_path_string( &mut self, program: &Program, context: &mut (impl ContextAccess + ?Sized), path: &str, ) -> Result<(), RuntimeError>
Move the play head to a named knot/stitch path — the equivalent of
ink’s Story.ChoosePathString(path) (with its default
resetCallstack: true). Call step_single_line
(or any continue method) afterward to run from there.
path is a dot-separated runtime path: a knot (intro), a qualified
stitch (intro.dock), or — for programs compiled by brink-compiler —
an author label (knot.label, knot.stitch.label; an extension over
C#, which cannot address labels).
Mirroring the C# reference (Story.ChoosePathString →
ResetCallstack/ForceEnd → ChoosePath → state.SetChosenPath +
VisitChangedContainersDueToDivert):
- The current flow is force-completed first: the call stack
collapses to a single fresh root frame (abandoning any tunnels,
threads, or in-progress weave), pending choices are cleared, and
the jump counts as a safe exit (as if the story had hit
-> DONE). - The jump counts as a visit to the target, with exactly the
semantics of an in-story
-> pathdivert (it goes through the same goto machinery, so counting flags are honored identically). - Output already produced but not yet consumed is kept (C# leaves the output stream untouched); it is delivered before content from the new location. The value stack is likewise left as-is.
- A permanently ended story (
-> END) may be re-entered by jumping, matching C# whereChoosePathString+Continueworks after the story has ended.
§Errors
UnknownPathifpathresolves to no target (the message names the path).JumpWhileAwaitingExternalif the flow is parked on an unresolved external call — a pending host call must be resolved, not silently abandoned.AlreadyEvaluatingFunctionif an engine→ink function evaluation is in progress (C# likewise refuses to redirect mid-function).
Sourcepub fn choose_path_string_with_args(
&mut self,
program: &Program,
context: &mut (impl ContextAccess + ?Sized),
path: &str,
args: &[Value],
) -> Result<(), RuntimeError>
pub fn choose_path_string_with_args( &mut self, program: &Program, context: &mut (impl ContextAccess + ?Sized), path: &str, args: &[Value], ) -> Result<(), RuntimeError>
Like choose_path_string but binds the
target knot’s declared parameters from args — host-directed entry
into a parameterized knot/stitch (=== call(action, present) ===),
which a plain path jump can’t reach with its params bound.
Semantics are otherwise identical to choose_path_string (force-ends
the current flow, counts as a visit, etc.). The args are pushed onto the
value stack in declaration order and bound by the target’s prologue —
exactly as an in-story -> call(a, b) divert binds them, so this enters
at the container start (where the prologue runs).
§Errors
In addition to choose_path_string’s errors:
ArgCountMismatch if args.len()
differs from the target container’s declared parameter count. (Programs
built by the converter record no param counts, so they report 0 — pass
no args.)
Sourcepub fn status(&self) -> StoryStatus
pub fn status(&self) -> StoryStatus
The current execution status of this flow.
Sourcepub fn did_safe_exit(&self) -> bool
pub fn did_safe_exit(&self) -> bool
Whether the most recent execution cycle ended with a safe exit —
an explicit -> DONE opcode — as opposed to falling off the end of
its content with nothing left to run.
Both cases deliver a terminal Step::Done; this is the only way
to tell them apart without issuing an extra advance/
step_single_line call and observing whether it returns
RuntimeError::RanOutOfContent.
Read it right after receiving a Step::Done — it is cleared at the
start of the next execution cycle, so a value read before a
terminal step is not meaningful.
true: the story chose to stop (a knot/stitch reached -> DONE);
resuming later is well-formed. false: the flow ran out of
content; the trailing text was still delivered, but resuming will
fault.
Sourcepub fn current_path(&self, program: &Program) -> Option<String>
pub fn current_path(&self, program: &Program) -> Option<String>
The knot or knot.stitch this flow is executing in — see
Story::current_path. Hosts that
drive instances directly (bevy-brink) pass the program they run.
Sourcepub fn stats(&self) -> &Stats
pub fn stats(&self) -> &Stats
Runtime statistics (instructions, materialization counts, etc.) accumulated over this flow’s execution.
Sourcepub fn take_runtime_warnings(&mut self) -> Vec<RuntimeWarning>
pub fn take_runtime_warnings(&mut self) -> Vec<RuntimeWarning>
Take every non-fatal crate::RuntimeWarning this flow has raised
since the last drain, leaving the list empty (issue #3354).
Draining rather than borrowing is deliberate: a host that prints
warnings as it plays wants each one once, and a host that ignores
them wants the list not to grow. Accumulation between drains is
capped at crate::RUNTIME_WARNING_CAP.
Sourcepub fn transcript(&self) -> &[OutputPart]
pub fn transcript(&self) -> &[OutputPart]
The full append-only transcript of all output parts produced so far.
The transcript stores structural references (e.g. LineRef) rather
than resolved strings, so it can be re-rendered in any locale by
passing a different set of line tables to
transcript::render_transcript.
Sourcepub fn transcript_len(&self) -> usize
pub fn transcript_len(&self) -> usize
Number of parts in the transcript.
Sourcepub fn reset_cursor(&mut self)
pub fn reset_cursor(&mut self)
Reset the transcript read cursor to the beginning (for re-rendering, e.g. after a locale swap).
Sourcepub fn fragments(&self) -> &Fragments
pub fn fragments(&self) -> &Fragments
The fragments captured during execution (for re-rendering choice display text and computed substrings in a different locale).
Sourcepub fn has_pending_external(&self) -> bool
pub fn has_pending_external(&self) -> bool
Returns true if this flow is frozen on an unresolved external
call — i.e. the VM hit a CallExternal opcode and the handler
returned ExternalResult::Pending, leaving the External frame
on top of the call stack.
The orchestration layer (e.g. a Bevy resolver system) polls this to
decide whether the flow needs an external resolved before it can be
driven further. Resolve via resolve_external.
Sourcepub fn pending_external_fn_id(&self) -> Option<DefinitionId>
pub fn pending_external_fn_id(&self) -> Option<DefinitionId>
The DefinitionId of the pending external function, if this flow
is frozen on one. Returns None otherwise.
Sourcepub fn pending_external_args(&self) -> &[Value]
pub fn pending_external_args(&self) -> &[Value]
The arguments to the pending external call, in declaration order. Empty if no external call is pending.
Sourcepub fn pending_external_name<'p>(&self, program: &'p Program) -> Option<&'p str>
pub fn pending_external_name<'p>(&self, program: &'p Program) -> Option<&'p str>
The ink-declared name of the pending external function, resolved
against program’s name table. Returns None if no external is
pending (or the entry is missing, which would indicate a malformed
program).
The orchestration layer uses this to look up the binding registered for this name.
Sourcepub fn resolve_external(&mut self, value: Value)
pub fn resolve_external(&mut self, value: Value)
Resolve a pending external call by supplying its return value. Pops
the External frame and pushes value onto the value stack so the
VM can resume. For fire-and-forget externals, pass Value::Null.
No-op if no external call is pending. After resolving, drive the
flow forward with step_single_line.
Sourcepub fn begin_function_eval<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
container_idx: u32,
args: &[Value],
resolver: Option<&dyn PluralResolver>,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
pub fn begin_function_eval<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
container_idx: u32,
args: &[Value],
resolver: Option<&dyn PluralResolver>,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
Evaluate an ink function from engine code, returning its value.
This does not advance the player-visible story: a
FunctionEvalFromGame boundary frame is pushed, args are passed
in declaration order (exactly as a normal call site would), output
is captured and discarded, and the function runs until it returns.
If the function calls an external whose handler returns
ExternalResult::Pending (e.g. a binding that needs Bevy World
access), evaluation pauses and returns
FunctionEval::AwaitingExternal; the caller resolves the
external (see resolve_external) and
calls resume_function_eval.
container_idx is the function’s container, typically obtained from
Program::find_address on the
function name. Unlike a normal Call, this does not increment the
function’s visit count — an engine query is out-of-band, matching
C#’s EvaluateFunction.
§Errors
AlreadyEvaluatingFunctionif a function evaluation is already in progress on this flow.FunctionYieldedif the function presents choices or ends the story (functions must not yield).UnresolvedExternalCallif an external has neither a binding nor a fallback.
Sourcepub fn begin_function_eval_with_limit<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
container_idx: u32,
args: &[Value],
resolver: Option<&dyn PluralResolver>,
step_limit: u64,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
pub fn begin_function_eval_with_limit<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
container_idx: u32,
args: &[Value],
resolver: Option<&dyn PluralResolver>,
step_limit: u64,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
Like begin_function_eval, but the VM
step budget for the whole evaluation is step_limit rather than the
hardcoded Self::STEP_LIMIT (#1868).
This is what lets a caller give an engine→ink evaluation its own,
appropriately scoped budget — e.g. a compile-time registry walk,
which wants a small ceiling of its own rather than the 1,000,000-step
production default — mirroring how advance_with_limit
already lets crate::Speculation cap the line-stepping path.
begin_function_eval itself is a thin wrapper over this with
step_limit: Self::STEP_LIMIT — every existing call site keeps its
exact prior behavior.
§Errors
Same as begin_function_eval, plus
StepLimitExceeded is now bounded
by the caller-supplied step_limit rather than the fixed default.
Sourcepub fn begin_function_value_eval<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
callee: &Value,
args: &[Value],
resolver: Option<&dyn PluralResolver>,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
pub fn begin_function_value_eval<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
callee: &Value,
args: &[Value],
resolver: Option<&dyn PluralResolver>,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
Evaluate an ink function value (FnRef/Closure) from engine
code — the host callback-invocation surface (T1c-3,
docs/t1c-spec.md §6). A function value crosses to the host as an
opaque token {DefinitionId, env}; the host never dereferences the
env — invocation always re-enters the VM here and is journaled
exactly like begin_function_eval.
callee must be a Value::FnRef / Value::Closure; args
supply the remaining (val-only) params after the value’s bound
prefix. The same fault set as in-story dispatch applies — non-function
callee, wrong arity, rehydration mismatch, cross-flow ref-#@local
(docs/t1c-spec.md §3/§6) — surfaced as the Err here rather than as
a turn-terminating story fault, since this is out-of-band evaluation.
Like begin_function_eval this does not
advance the player-visible story (output isolated, transcript
untouched, no visit-count increment) and pauses on world-access
externals — resume with
resume_function_eval.
§Errors
AlreadyEvaluatingFunctionif an evaluation is already in progress on this flow.- The function-value dispatch faults above (via
vm::prepare_fn_value_call), before any frame is pushed. - The same evaluation errors as
begin_function_eval.
Sourcepub fn begin_function_value_eval_with_limit<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
callee: &Value,
args: &[Value],
resolver: Option<&dyn PluralResolver>,
step_limit: u64,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
pub fn begin_function_value_eval_with_limit<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
callee: &Value,
args: &[Value],
resolver: Option<&dyn PluralResolver>,
step_limit: u64,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
Like begin_function_value_eval,
but the VM step budget for the whole evaluation is step_limit
rather than the hardcoded Self::STEP_LIMIT (#1868) — the function-value
sibling of begin_function_eval_with_limit.
§Errors
Same as begin_function_value_eval,
plus StepLimitExceeded is now
bounded by the caller-supplied step_limit rather than the fixed
default.
Sourcepub fn resume_function_eval<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
pub fn resume_function_eval<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
Resume a function evaluation that paused on
FunctionEval::AwaitingExternal, after the pending external has
been resolved via resolve_external.
§Errors
NotEvaluatingFunctionif no evaluation is in progress.- Same evaluation errors as
begin_function_eval.
Sourcepub fn resume_function_eval_with_limit<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
step_limit: u64,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
pub fn resume_function_eval_with_limit<R>(
&mut self,
program: &Program,
line_tables: &[Vec<LineEntry>],
context: &mut (impl ContextAccess + ?Sized),
handler: &dyn ExternalFnHandler,
resolver: Option<&dyn PluralResolver>,
step_limit: u64,
) -> Result<FunctionEval, RuntimeError>where
R: StoryRng,
Like resume_function_eval, but the VM
step budget for the remainder of the evaluation is step_limit
rather than the hardcoded Self::STEP_LIMIT (#1868). A caller that
began the evaluation with
begin_function_eval_with_limit/
begin_function_value_eval_with_limit
should resume with the same step_limit to keep one consistent
budget across pauses — this call’s step count starts fresh (mirrors
advance_with_limit: each call gets its
own step_limit-sized allowance, not a running total).
§Errors
Same as resume_function_eval, plus
StepLimitExceeded is now bounded
by the caller-supplied step_limit rather than the fixed default.
Sourcepub fn is_evaluating_function(&self) -> bool
pub fn is_evaluating_function(&self) -> bool
Returns true if a function evaluation is in progress (possibly
paused awaiting an external).
Trait Implementations§
Source§impl Clone for FlowInstance
impl Clone for FlowInstance
Source§fn clone(&self) -> FlowInstance
fn clone(&self) -> FlowInstance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FlowInstance
impl RefUnwindSafe for FlowInstance
impl Send for FlowInstance
impl Sync for FlowInstance
impl Unpin for FlowInstance
impl UnsafeUnpin for FlowInstance
impl UnwindSafe for FlowInstance
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.