Skip to main content

Memory

Struct Memory 

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

Implementations§

Source§

impl Memory

Source

pub fn resolve_active_descendant( &self, trigger: NodeId, ) -> Result<Option<NodeId>, Error>

Named relations may resolve after construction. Missing, inactive or retired members are never reported as an active option; identity comes from the current live name registry, not an old slot or visited history.

Source§

impl Memory

Source

pub fn submission(&mut self) -> Result<Submission<'_>, Error>

Source§

impl Memory

Source

pub fn file_pending( &self, node: NodeId, request: u64, revision: u64, ) -> Result<bool, Error>

Source

pub fn validate_file_action(&self, action: Action) -> Result<(), Error>

Source

pub fn admit_file_action(&mut self, action: Action) -> Result<(), Error>

Source

pub fn next_file_request(&self, node: NodeId) -> Result<u64, Error>

Source

pub fn admit_file_picker( &mut self, node: NodeId, revision: u64, request: u64, ) -> Result<(), Error>

Source

pub fn validate_file_event( &self, node: NodeId, document: FileDocumentId, event: &FileEvent, ) -> Result<bool, Error>

Source

pub fn finish_files( &mut self, node: NodeId, document: FileDocumentId, event: &FileEvent, ) -> Result<bool, Error>

Source

pub fn selected_file(&self, token: FileToken) -> Result<&FileInfo, Error>

Source

pub fn clear_files(&mut self, node: NodeId, revision: u64) -> Result<(), Error>

Source

pub fn remove_file(&mut self, token: FileToken) -> Result<(), Error>

Source

pub fn next_clipboard_request(&self, node: NodeId) -> Result<u64, Error>

Numeric identity belongs to this live NodeId, even if the source facet is cleared and declared again. Merely reading it does not reserve it.

Source

pub fn clipboard_pending( &self, node: NodeId, request: u64, revision: u64, ) -> Result<bool, Error>

Source

pub fn validate_clipboard_action(&self, action: Action) -> Result<(), Error>

Source

pub fn admit_clipboard(&mut self, action: Action) -> Result<(), Error>

Shared request admission. Call after capability checks, immediately before queuing/performing the host action. No payload or callback cache.

Source

pub fn finish_clipboard( &mut self, node: NodeId, request: u64, revision: u64, ) -> Result<bool, Error>

First terminal delivery consumes the current pending numeric request.

Source

pub fn cancel_clipboard(&mut self, node: NodeId) -> Result<(), Error>

Source

pub fn new(runtime: RuntimeId) -> Self

Source

pub fn node(&self, id: NodeId) -> Result<&Node, Error>

Source

pub fn named(&self, name: &SemanticId) -> Option<NodeId>

Resolve a symbolic relation to its live identity in O(1), without owning the target or retaining names after disposal.

Source

pub fn navigation(&self, id: NodeId) -> Option<(NodeId, Orientation)>

Nearest explicit collection boundary of a registered trigger. Walk only semantic ancestors; never infer membership for descendant editors.

Source

pub fn roots(&self) -> &[NodeId]

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn retained_slots(&self) -> usize

Source

pub fn layers(&self) -> usize

Numeric current declaration count; no source or historical layer scan.

Source

pub fn stats(&self) -> Stats

Source

pub fn receipt(&self) -> Receipt

Accepted operation watermark, without forcing observation or layout.

Source

pub fn prepare_patch( &mut self, id: NodeId, patch: &Patch, ) -> Result<PreparedPatch<'_>, Error>

Prepare against this validated/canonical live tree without cloning the descriptor or scanning unrelated payloads. The guard can be inspected by a lowering adapter, then committed, or dropped if adapter checks fail.

Source

pub fn active(&self, id: NodeId) -> bool

Suspension is inherited, but each node retains its own logical owner and order. Disposing a parent also destroys its suspended children.

Source

pub fn layer_anchor_live(&self, id: NodeId) -> bool

Resolve one current named anchor and its ancestry. Missing or late-bound relations remain valid configuration, but cannot open a physical layer.

Source

pub fn enabled(&self, id: NodeId) -> bool

Logical group disabling also applies before a host has committed markup. No source scan: only the live target and its ancestors are inspected.

Source

pub fn inert(&self, id: NodeId) -> bool

Current semantic ancestry only; inert keeps layout, owners and queries.

Source

pub fn validate_event(&self, id: NodeId, event: &Event) -> Result<bool, Error>

False means an embedded origin was retired or is no longer active. Malformed live origins/payloads are errors; no callback or mutation runs.

Source

pub fn push_event(&mut self, id: NodeId, event: Event) -> Result<(), Error>

Source

pub fn next_sibling(&self, id: NodeId) -> Result<Option<NodeId>, Error>

Next logical sibling of a placed node, including suspended siblings. Identity validation precedes the constant-time adjacency lookup.

Source

pub fn validate_child( &self, child: Subtree<'_>, parent: Option<NodeId>, ) -> Result<(), Error>

Check a proposed parent/child relation without allocating identities or modifying state. Ordinary moves visit ancestors only; only restricted interactive/button contexts require examining the child’s live subtree.

Source

pub fn validate_placement( &self, id: NodeId, parent: Option<NodeId>, before: Option<NodeId>, resume: bool, ) -> Result<(), Error>

Read-only validation shared by App staging and direct reference apply.

Source

pub fn dispose(&mut self, id: NodeId) -> Result<(Receipt, Vec<NodeId>), Error>

Apply one Dispose and return its retired identities in traversal order. Adapters use the removal itself to reclaim their identity-indexed state, instead of first walking the same subtree to build a second inventory. Includes detached/suspended descendants; rejection preserves the receipt.

Source§

impl Memory

Source

pub fn focus_scopes(&self) -> usize

Source

pub fn focus_scope_roots(&self) -> impl Iterator<Item = NodeId> + '_

Only current declared roots; no visited nodes or business data.

Source

pub fn focus_scope_nodes(&self, root: NodeId) -> Result<Option<usize>, Error>

Source§

impl Memory

Source

pub fn menu_search_owner(&self, input: NodeId) -> Result<Option<NodeId>, Error>

Resolve against current ancestry and live names, with no menu registry.

Source§

impl Memory

Source

pub fn inherited_environment( &self, id: NodeId, ) -> Result<Option<&Environment>, Error>

Current semantic ancestry, including unplaced and suspended nodes. The caller still applies its host’s liveness and capability rules separately.

Trait Implementations§

Source§

impl Debug for Memory

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Render for Memory

Source§

fn supports_plot_pointer(&self) -> bool

Whether this host implements the finite local-coordinate plot channel. Static adapters may record interests for later adoption; input adapters must opt in explicitly. This does not enable ordinary Pointer events.
Source§

fn listen( &mut self, node: NodeId, kind: EventKind, enabled: bool, ) -> Result<(), Error>

Event interest is frame metadata. Hosts may use it to avoid observing thousands of nodes whose resize/scroll events nobody consumes.
Source§

fn action(&mut self, action: Action) -> Result<(), Error>

Actions run after a frame’s mutations and before subsequent queries. Unsupported focus refusal leaves the semantic tree valid: App treats it as an unfulfilled intent and continues later intents. Backend errors remain fatal. Never synthesize FocusChanged(true) merely for accepting Focus.
Source§

fn needs_observe(&self) -> bool

Another local observation can make progress without awaiting I/O, an animation timestamp or a future browser frame. Read-only and never runs application code. Hosts with asynchronous observation keep the default.
Source§

fn style_profile(&self) -> Profile

Declared once per App. Default rejects nonempty inline styles; adapters opt into exactly the declarations/values they preserve or implement.
Source§

fn capabilities(&self) -> Capabilities

Source§

fn apply(&mut self, mutations: &[Mutation]) -> Result<Receipt, Error>

Source§

fn request(&mut self, query: Query, token: QueryToken) -> Result<(), Error>

Source§

fn drain(&mut self, inputs: &mut Vec<Input>)

Return queued inputs, never synchronously reenter business closures.
Source§

fn flush_display(&mut self) -> Result<(), Error>

Commit adapter-owned display slots after semantic mutations and before actions/queries. This does not allocate semantic element identities.
Source§

fn preflight( &self, _node: DescriptorView<'_>, _patch: Option<&Patch>, ) -> Result<(), Error>

Reject descriptor-local limitations before the App changes its logical tree or queues output. None checks creation; Some checks a patch against the supplied current descriptor, including earlier uncommitted changes. Read only these arguments and immutable adapter configuration: no host calls, layout, application callbacks, or committed-tree lookups. Adapters must enforce the same restrictions in apply for callers without an App. This is not a transaction or a guarantee that later host work succeeds.
Source§

fn preflight_place( &self, _tree: &Memory, _child: Subtree<'_>, _parent: Option<NodeId>, ) -> Result<(), Error>

Validate adapter-specific ancestor/content constraints against the App’s staged semantic tree, including uncommitted Create/Patch/Place changes. New children are checked before identity allocation; existing children before Place/Resume changes the model or output queue. Read only these arguments/configuration: no host tree, layout, I/O or application code. The App checks shared identity/placement semantics first. Default adds no restrictions. Direct apply must enforce the same content rules.
Source§

fn set_profile(&mut self, profile: Option<Profile>) -> Option<Profile>

Optional local diagnostics. Return an unused or retired handle so its captured clock is dropped outside the caller’s renderer borrow.
Source§

fn bounds_now(&mut self, _node: NodeId) -> Option<Result<Rect, Error>>

Optional immediate physical read at the caller’s committed barrier. None means the host requires the queued Bounds query. Never call user code.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Memory

§

impl !Send for Memory

§

impl !Sync for Memory

§

impl !UnwindSafe for Memory

§

impl Forget for Memory

§

impl Freeze for Memory

§

impl Move for Memory

§

impl Unpin for Memory

§

impl UnsafeUnpin for Memory

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<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, 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, !>

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.