Enum iced::widget::rule::FillMode[]

pub enum FillMode {
    Full,
    Percent(f32),
    Padded(u16),
    AsymmetricPadding(u16u16),
}

The fill mode of a rule.

Variants

Full

Fill the whole length of the container.

Percent(f32)

Fill a percent of the length of the container. The rule will be centered in that container.

The range is [0.0, 100.0].

Padded(u16)

Uniform offset from each end, length units.

AsymmetricPadding(u16u16)

Different offset on each end of the rule, length units. First = top or left.

Implementations

impl FillMode

pub fn fill(&self, space: f32) -> (f32, f32)

Return the starting offset and length of the rule.

  • space - The space to fill.

Returns

  • (starting_offset, length)

Trait Implementations

impl Clone for FillMode

impl Copy for FillMode

impl Debug for FillMode

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,