Struct css_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 css_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 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 StyleUpdater for Size
[src]
fn update_style(self, style: Style) -> Style
[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]
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
pub fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
pub fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
pub fn convert_into(self) -> U
[src]
pub fn convert_unclamped_into(self) -> U
[src]
pub fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,