pub enum ReadMode {
Full,
Structure,
Layout,
Design,
Notes,
Spec,
Visual,
When,
Edges,
Diff,
}Expand description
What an AI agent wants to read from the document.
Each mode selectively emits only the properties relevant to a specific concern, saving 50-80% tokens while preserving structural understanding.
Variants§
Full
Full file — no filtering (identical to emit_document).
Structure
Node types, @ids, parent-child nesting only.
Layout
Structure + dimensions (w:/h:) + layout: directives + constraints.
Design
Structure + styles + fill:/stroke:/font:/corner:/use: refs.
Notes
Structure + note {} blocks + annotations.
Spec
Backward-compatible alias for Notes.
Visual
Layout + Design + When combined — the full visual story.
When
Structure + when :trigger { ... } animation blocks only.
Edges
Structure + edge @id { ... } blocks.
Diff
Only shows changes since a previous snapshot.
Requires calling snapshot_graph first to create a baseline.
Trait Implementations§
impl Copy for ReadMode
impl Eq for ReadMode
impl StructuralPartialEq for ReadMode
Auto Trait Implementations§
impl Freeze for ReadMode
impl RefUnwindSafe for ReadMode
impl Send for ReadMode
impl Sync for ReadMode
impl Unpin for ReadMode
impl UnsafeUnpin for ReadMode
impl UnwindSafe for ReadMode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.