FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TextTabStops

    struct · ferroui-base · v0.5.0

    struct TextTabStops
    

    A value configuration, shared immutably by paragraph properties and snapshots. Replacing it raises one property change; querying or cloning it allocates nothing.

    View source

    Members

    MAX_COUNT

    const MAX_COUNT: usize
    

    Source

    new

    fn new(stops: impl IntoIterator<Item = TextTabStop>) -> Result<Self, TextTabError>
    

    Normalizes positions to ascending order. A later stop at the same position replaces its earlier alignment and leader, just as adding that stop does.

    Source

    as_slice

    fn as_slice(self: &Self) -> &[TextTabStop]
    

    Source

    len

    fn len(self: &Self) -> usize
    

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Source

    with_tab

    fn with_tab(self: &Self, stop: TextTabStop) -> Result<Self, TextTabError>
    

    Source

    without_tab

    fn without_tab(self: &Self, position: f64) -> Result<Self, TextTabError>
    

    Removing a nonexistent position leaves the value unchanged.

    Source

    get

    fn get(self: &Self, index: usize) -> Result<TextTabStop, TextTabError>
    

    Source

    parse

    fn parse(text: &str) -> Result<Self, TextTabError>
    

    XAML distances are layout units. Example: 48,Left;96,Decimal,Dots.

    Source

    Trait implementations

    Availability

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