Struct css_style::margin::Margin [−][src]
pub struct Margin { pub top: Option<Length>, pub right: Option<Length>, pub bottom: Option<Length>, pub left: Option<Length>, }
use css_style::{Style, unit::px, margin::Length}; Style::default() .and_margin(|conf| { conf.x(Length::Auto) // equal to conf.left(Length::Auto).right(Length::Auto) .y(px(4)) });
Fields
top: Option<Length>
right: Option<Length>
bottom: Option<Length>
left: Option<Length>
Implementations
impl Margin
[src]
pub fn top(self, value: impl Into<Length>) -> Self
[src]
pub fn try_top(self, value: Option<impl Into<Length>>) -> Self
[src]
pub fn right(self, value: impl Into<Length>) -> Self
[src]
pub fn try_right(self, value: Option<impl Into<Length>>) -> Self
[src]
pub fn bottom(self, value: impl Into<Length>) -> Self
[src]
pub fn try_bottom(self, value: Option<impl Into<Length>>) -> Self
[src]
pub fn left(self, value: impl Into<Length>) -> Self
[src]
pub fn try_left(self, value: Option<impl Into<Length>>) -> Self
[src]
impl Margin
[src]
pub fn all(self, value: impl Into<Length>) -> Self
[src]
pub fn zero(self) -> Self
[src]
pub fn x(self, value: impl Into<Length>) -> Self
[src]
pub fn y(self, value: impl Into<Length>) -> Self
[src]
pub fn horizontal(self, value: impl Into<Length>) -> Self
[src]
pub fn vertical(self, value: impl Into<Length>) -> Self
[src]
pub fn auto(self) -> Self
[src]
pub fn full(self) -> Self
[src]
pub fn half(self) -> Self
[src]
Trait Implementations
impl Clone for Margin
[src]
impl Debug for Margin
[src]
impl Default for Margin
[src]
impl From<(Option<Length>, Option<Length>, Option<Length>, Option<Length>)> for Margin
[src]
impl From<Length> for Margin
[src]
impl From<Length> for Margin
[src]
impl From<Percent> for Margin
[src]
impl PartialEq<Margin> for Margin
[src]
impl StructuralPartialEq for Margin
[src]
impl StyleUpdater for Margin
[src]
fn update_style(self, style: Style) -> Style
[src]
Auto Trait Implementations
impl RefUnwindSafe for Margin
impl Send for Margin
impl Sync for Margin
impl Unpin for Margin
impl UnwindSafe for Margin
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>,