pub trait SplitRule: Neg<Output = Self> {
// Required method
fn split_once(self, value: u16) -> (u16, u16);
}Expand description
Defines how to split a dimension into two parts.
Implemented for i32 (absolute pixel count) and f64 (ratio).
Negative values take from the end instead of the beginning.
Required Methods§
Sourcefn split_once(self, value: u16) -> (u16, u16)
fn split_once(self, value: u16) -> (u16, u16)
Splits the given value into two parts according to this rule.