Trait ForkScopes

Source
pub trait ForkScopes:
    Portable
    + Default
    + Debug
    + Accrete { }
Expand description

A scope is an abstract area for storing branch-local state and anything logically related to that fork, such as:

  • values
  • references
  • pointers
  • indexes
  • cached storage views
  • execution context
  • fork-local metadata
  • lineage-dependent runtime state

ForkScopes is generational:

  • Default provides the empty first generation
  • Portable provides codec-safe storage and cloning
  • Accrete allows each new branch to inherit and extend scope

When a new fork branch is created, it accretes from its parent branch, carrying forward previous generations while starting a fresh local layer.

This makes the newest generation the full reachable state, avoiding repeated traversal of older branch ancestry during inspection.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> ForkScopes for T
where T: Portable + Default + Debug + Accrete,

Blanked Implementation for all types that satisfy the trait impls.