pub struct ModelineSnapshot {
pub registry: Arc<ModelineRegistry>,
pub content: Arc<HashMap<(ModelineKey, ElementId), ElementContent>>,
}Expand description
A published, wait-free snapshot of the modeline state the renderer
reads: descriptors + content, each an Arc (cheap clone). The host
takes one per build_render_state and stores it in RenderState
(ML.0b-2).
Fields§
§registry: Arc<ModelineRegistry>The descriptors as of the snapshot.
content: Arc<HashMap<(ModelineKey, ElementId), ElementContent>>Pushed content by (slot, element). Built-in core.* elements are
computed host-side and are not stored here.
Implementations§
Source§impl ModelineSnapshot
impl ModelineSnapshot
Sourcepub fn content_for(
&self,
key: ModelineKey,
id: &ElementId,
) -> Option<&ElementContent>
pub fn content_for( &self, key: ModelineKey, id: &ElementId, ) -> Option<&ElementContent>
Content stored under an exact (key, id), if any. Prefer
Self::resolve from a renderer — it derives the key from the
descriptor’s scope + the pane’s buffer.
Sourcepub fn resolve(
&self,
el: &ModelineElement,
buffer: BufferId,
) -> Option<&ElementContent>
pub fn resolve( &self, el: &ModelineElement, buffer: BufferId, ) -> Option<&ElementContent>
Resolve el’s content for the pane showing buffer (ML.3). A
Scope::PaneLocal descriptor keys by Buffer(buffer); a
Scope::Global descriptor keys by Global. This is the
renderer’s per-element lookup (built-ins are computed host-side
and bypass the store). Returns None when no producer has pushed
content for this (scope-key, id) — the element is hidden.
Sourcepub fn zone(
&self,
zone: Zone,
buffer: BufferId,
) -> Vec<(&ModelineElement, &ElementContent)>
pub fn zone( &self, zone: Zone, buffer: BufferId, ) -> Vec<(&ModelineElement, &ElementContent)>
Zone-ordered (descriptor, content) pairs for the pane showing
buffer, skipping elements with absent or empty content (hidden
this frame). Resolves each descriptor’s content per its scope via
Self::resolve. Built-in core.* elements are computed
host-side, not stored, so they do NOT appear here — the renderer
iterates registry.zone_ordered directly and routes core ids to
the host resolver. This helper is for pushed-content tests.
Trait Implementations§
Source§impl Clone for ModelineSnapshot
impl Clone for ModelineSnapshot
Source§fn clone(&self) -> ModelineSnapshot
fn clone(&self) -> ModelineSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more