Struct savory_style::size::Size[][src]

pub struct Size {
    pub width: Option<Length>,
    pub min_width: Option<Length>,
    pub max_width: Option<Length>,
    pub height: Option<Length>,
    pub min_height: Option<Length>,
    pub max_height: Option<Length>,
}
use savory_style::{Style, unit::em};

Style::default()
    .and_size(|conf| {
        conf.width(em(2.))
            .height(em(1.5))
            .min_width(em(1.5))
            .min_height(em(1.))
            .max_width(em(4.))
            .max_height(em(3.))
    });

Fields

width: Option<Length>min_width: Option<Length>max_width: Option<Length>height: Option<Length>min_height: Option<Length>max_height: Option<Length>

Implementations

impl Size[src]

pub fn width(self, value: impl Into<Length>) -> Self[src]

pub fn try_width(self, value: Option<impl Into<Length>>) -> Self[src]

pub fn min_width(self, value: impl Into<Length>) -> Self[src]

pub fn try_min_width(self, value: Option<impl Into<Length>>) -> Self[src]

pub fn max_width(self, value: impl Into<Length>) -> Self[src]

pub fn try_max_width(self, value: Option<impl Into<Length>>) -> Self[src]

pub fn height(self, value: impl Into<Length>) -> Self[src]

pub fn try_height(self, value: Option<impl Into<Length>>) -> Self[src]

pub fn min_height(self, value: impl Into<Length>) -> Self[src]

pub fn try_min_height(self, value: Option<impl Into<Length>>) -> Self[src]

pub fn max_height(self, value: impl Into<Length>) -> Self[src]

pub fn try_max_height(self, value: Option<impl Into<Length>>) -> Self[src]

impl Size[src]

pub fn full(self) -> Self[src]

pub fn half(self) -> Self[src]

pub fn min_content(self) -> Self[src]

pub fn max_content(self) -> Self[src]

pub fn auto(self) -> Self[src]

pub fn resize(self, width: impl Into<Length>, height: impl Into<Length>) -> Self[src]

pub fn all(self, val: impl Into<Length>) -> Self[src]

pub fn all_widths(self, width: impl Into<Length>) -> Self[src]

pub fn all_heights(self, val: impl Into<Length>) -> Self[src]

Trait Implementations

impl Clone for Size[src]

impl Debug for Size[src]

impl DeclarativeConfig for Size[src]

impl Default for Size[src]

impl From<Length> for Size[src]

impl From<Length> for Size[src]

impl From<Percent> for Size[src]

impl From<f32> for Size[src]

impl PartialEq<Size> for Size[src]

impl StructuralPartialEq for Size[src]

impl UpdateStyleValues for Size[src]

Auto Trait Implementations

impl RefUnwindSafe for Size

impl Send for Size

impl Sync for Size

impl Unpin for Size

impl UnwindSafe for Size

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

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, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

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

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>,