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.
Members
MAX_COUNT
const MAX_COUNT: usize
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.
as_slice
fn as_slice(self: &Self) -> &[TextTabStop]
len
fn len(self: &Self) -> usize
is_empty
fn is_empty(self: &Self) -> bool
with_tab
fn with_tab(self: &Self, stop: TextTabStop) -> Result<Self, TextTabError>
without_tab
fn without_tab(self: &Self, position: f64) -> Result<Self, TextTabError>
Removing a nonexistent position leaves the value unchanged.
get
fn get(self: &Self, index: usize) -> Result<TextTabStop, TextTabError>
parse
fn parse(text: &str) -> Result<Self, TextTabError>
XAML distances are layout units. Example: 48,Left;96,Decimal,Dots.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDebugDefaultStructuralPartialEqPartialEqMarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.