FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    GridLength

    struct · ferroui-treedatagrid-core · v0.5.0

    struct GridLength
    

    A length that is a size in pixels, a weighted share of the remaining space (*) or determined by the content (Auto).

    View source

    Members

    new

    fn new(value: f64, unit: GridUnitType) -> Self
    

    A length of value in unit.

    Panics

    When value is not a number, infinite or negative (ArgumentOutOfRangeException).

    Source

    pixels

    fn pixels(value: f64) -> Self
    

    A length in pixels.

    Source

    STAR

    const STAR: GridLength
    

    1*.

    Source

    AUTO

    const AUTO: GridLength
    

    Auto.

    Source

    auto

    fn auto() -> Self
    

    Auto.

    Source

    star

    fn star() -> Self
    

    1*.

    Source

    value

    fn value(self: &Self) -> f64
    

    Source

    grid_unit_type

    fn grid_unit_type(self: &Self) -> GridUnitType
    

    Source

    is_auto

    fn is_auto(self: &Self) -> bool
    

    Source

    is_star

    fn is_star(self: &Self) -> bool
    

    Source

    is_absolute

    fn is_absolute(self: &Self) -> bool
    

    Source

    parse

    fn parse(text: &str) -> Self
    

    Parses Auto, <number>, <number>* or * (invariant culture, case-insensitive Auto).

    Panics

    When the text is not a length (FormatException), or is a negative length.

    Source

    try_parse

    fn try_parse(text: &str) -> Option<Self>
    

    parse without the panic of a malformed text.

    Source

    Trait implementations

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

    Availability

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