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).
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).
pixels
fn pixels(value: f64) -> Self
A length in pixels.
STAR
const STAR: GridLength
1*.
AUTO
const AUTO: GridLength
Auto.
auto
fn auto() -> Self
Auto.
star
fn star() -> Self
1*.
value
fn value(self: &Self) -> f64
grid_unit_type
fn grid_unit_type(self: &Self) -> GridUnitType
is_auto
fn is_auto(self: &Self) -> bool
is_star
fn is_star(self: &Self) -> bool
is_absolute
fn is_absolute(self: &Self) -> bool
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.
try_parse
fn try_parse(text: &str) -> Option<Self>
parse without the panic of a malformed text.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTreeModelBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneCopyDebugStructuralPartialEqPartialEqDefaultFrom<f64>Display
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.