FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    paragraphs

    paragraphs: Vec<ParagraphSnapshot>
    

    Source

    link_fields: Vec<super::DocumentLinkField>
    

    Instruction metadata in visible UTF-16 coordinates. Rendered hyperlink segments carry the matching identity; one field may cross paragraphs.

    Source

    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.

    Source

    from_text

    fn from_text(text: &str) -> Self
    

    Creates plain content, normalizing CRLF and CR paragraph separators to LF.

    Source

    text

    fn text(self: &Self) -> String
    

    Source

    text_length

    fn text_length(self: &Self) -> usize
    

    Source

    validate

    fn validate(self: &Self) -> Result<(), super::DocumentError>
    

    Checks all values before a restore or insertion can mutate a live tree.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Default

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.