pub struct LoadReport {
pub unknown_globals: Vec<String>,
pub unresolved_renames: Vec<String>,
pub anonymous_states_dropped: u32,
}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.
What Story::load_state couldn’t apply, so a host can surface it rather
than have data silently vanish. Globals whose name no longer exists are
dropped (no slot to hold them) and reported here. Visit/turn counts are
never dropped — counts for scopes the current program lacks are retained
harmlessly (unused until/unless the scope returns), so they aren’t reported
except when the miss-path alias lookup (M-3, docs/modules-spec.md §5)
still can’t place them — see unresolved_renames for a named scope,
or anonymous_states_dropped for an anonymous one.
Fields§
§unknown_globals: Vec<String>Saved global names with no matching global in the current program.
unresolved_renames: Vec<String>M-3 rehydration miss-path teaching messages (docs/modules-spec.md
§5): a saved fn token, divert value, or visit/turn-count key that
didn’t match the current program even after consulting the compiled
#@was alias table. Only populated for a program that actually
carries alias-table entries (i.e. uses #@was somewhere) — an
ordinary content edit with no rename directive stays silent, same
as before M-3.
anonymous_states_dropped: u32Count of saved visit/turn-count entries for an anonymous scope
(VisitEntry::path is None — a gather or choice point with no
author label, or a sequence, none of which have a name an #@was
alias table entry could ever be written against) that could not be
placed in the current program (issue #1674, gap 4 of the identity
cluster: “anonymous-container state is bounded and reported, not
solved”). Unlike unresolved_renames, this is populated
unconditionally on a miss — an anonymous scope’s positional id can
never be recovered through the alias table regardless of whether the
program uses #@was elsewhere, so gating this on
Program::has_aliases (the way unresolved_renames is) would make
it silent for the overwhelming majority of projects, defeating the
point.
The bounded fallout docs/decision-log.md’s 2026-07-27 ruling
measured: a once-only choice may reappear as if never chosen, or a
sequence may restart from its first branch. Each miss increments
this once per saved entry — a scope with both a visit and a turn
count that both go unresolved counts as two, since each is
independently lost state, not one.
That “bounded” measurement covers the visit/turn-count half only.
The same day’s “CORRECTION to the R1 entry” widened the blast
radius: anonymous scopes also carry translation units (intl exports
keyed by scope id, Option-named), which this field does not
account for — it counts only what Story::load_state itself drops.
Implementations§
Trait Implementations§
Source§impl Clone for LoadReport
impl Clone for LoadReport
Source§fn clone(&self) -> LoadReport
fn clone(&self) -> LoadReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LoadReport
impl Debug for LoadReport
Source§impl Default for LoadReport
impl Default for LoadReport
Source§fn default() -> LoadReport
fn default() -> LoadReport
Source§impl PartialEq for LoadReport
impl PartialEq for LoadReport
Source§impl Serialize for LoadReport
impl Serialize for LoadReport
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for LoadReport
Auto Trait Implementations§
impl Freeze for LoadReport
impl RefUnwindSafe for LoadReport
impl Send for LoadReport
impl Sync for LoadReport
impl Unpin for LoadReport
impl UnsafeUnpin for LoadReport
impl UnwindSafe for LoadReport
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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
impl<T> Settings for T
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.