DocumentSnapshot
struct · ferroui-controls · v0.5.0
struct DocumentSnapshot
An owned image of document content. Character data and formatting collections are independent of the live document; embedded controls retain their identity.
Members
paragraphs
paragraphs: Vec<ParagraphSnapshot>
link_fields
link_fields: Vec<super::DocumentLinkField>
Instruction metadata in visible UTF-16 coordinates. Rendered hyperlink segments carry the matching identity; one field may cross paragraphs.
next_link_field_id
next_link_field_id: u64
The next available identity in this snapshot. A live document also keeps a monotonic allocation floor across undo, so retired handles never alias.
from_text
fn from_text(text: &str) -> Self
Creates plain content, normalizing CRLF and CR paragraph separators to LF.
text
fn text(self: &Self) -> String
text_length
fn text_length(self: &Self) -> usize
validate
fn validate(self: &Self) -> Result<(), super::DocumentError>
Checks all values before a restore or insertion can mutate a live tree.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneDebugStructuralPartialEqPartialEqDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.