Struct css_style::padding::Padding [−][src]
pub struct Padding { pub top: Option<Length>, pub right: Option<Length>, pub bottom: Option<Length>, pub left: Option<Length>, }
use css_style::{Style, unit::px}; Style::default() .and_padding(|conf| { conf.x(px(2)) // equal to conf.left(px(2)).right(px(2)) .y(px(4)) });
Fields
top: Option<Length>
right: Option<Length>
bottom: Option<Length>
left: Option<Length>
Implementations
impl Padding
[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 Padding
[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 full(self) -> Self
[src]
pub fn half(self) -> Self
[src]
Trait Implementations
impl Clone for Padding
[src]
impl Debug for Padding
[src]
impl Default for Padding
[src]
impl From<(Option<Length>, Option<Length>, Option<Length>, Option<Length>)> for Padding
[src]
fn from(
original: (Option<Length>, Option<Length>, Option<Length>, Option<Length>)
) -> Padding
[src]
original: (Option<Length>, Option<Length>, Option<Length>, Option<Length>)
) -> Padding
impl From<Length> for Padding
[src]
impl From<Length> for Padding
[src]
impl From<Percent> for Padding
[src]
impl PartialEq<Padding> for Padding
[src]
impl StructuralPartialEq for Padding
[src]
impl StyleUpdater for Padding
[src]
fn update_style(self, style: Style) -> Style
[src]
Auto Trait Implementations
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnwindSafe for Padding
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>,