Struct style::properties::generated::style_structs::Margin
source · pub struct Margin {
pub margin_top: T,
pub margin_right: T,
pub margin_bottom: T,
pub margin_left: T,
}
Expand description
The Margin style struct.
Fields§
§margin_top: T
The margin-top computed value.
margin_right: T
The margin-right computed value.
margin_bottom: T
The margin-bottom computed value.
margin_left: T
The margin-left computed value.
Implementations§
source§impl Margin
impl Margin
sourcepub fn set_margin_top(&mut self, v: T)
pub fn set_margin_top(&mut self, v: T)
Set margin-top.
sourcepub fn copy_margin_top_from(&mut self, other: &Self)
pub fn copy_margin_top_from(&mut self, other: &Self)
Set margin-top from other struct.
sourcepub fn reset_margin_top(&mut self, other: &Self)
pub fn reset_margin_top(&mut self, other: &Self)
Reset margin-top from the initial struct.
sourcepub fn clone_margin_top(&self) -> T
pub fn clone_margin_top(&self) -> T
Get the computed value for margin-top.
sourcepub fn set_margin_right(&mut self, v: T)
pub fn set_margin_right(&mut self, v: T)
Set margin-right.
sourcepub fn copy_margin_right_from(&mut self, other: &Self)
pub fn copy_margin_right_from(&mut self, other: &Self)
Set margin-right from other struct.
sourcepub fn reset_margin_right(&mut self, other: &Self)
pub fn reset_margin_right(&mut self, other: &Self)
Reset margin-right from the initial struct.
sourcepub fn clone_margin_right(&self) -> T
pub fn clone_margin_right(&self) -> T
Get the computed value for margin-right.
sourcepub fn set_margin_bottom(&mut self, v: T)
pub fn set_margin_bottom(&mut self, v: T)
Set margin-bottom.
sourcepub fn copy_margin_bottom_from(&mut self, other: &Self)
pub fn copy_margin_bottom_from(&mut self, other: &Self)
Set margin-bottom from other struct.
sourcepub fn reset_margin_bottom(&mut self, other: &Self)
pub fn reset_margin_bottom(&mut self, other: &Self)
Reset margin-bottom from the initial struct.
sourcepub fn clone_margin_bottom(&self) -> T
pub fn clone_margin_bottom(&self) -> T
Get the computed value for margin-bottom.
sourcepub fn set_margin_left(&mut self, v: T)
pub fn set_margin_left(&mut self, v: T)
Set margin-left.
sourcepub fn copy_margin_left_from(&mut self, other: &Self)
pub fn copy_margin_left_from(&mut self, other: &Self)
Set margin-left from other struct.
sourcepub fn reset_margin_left(&mut self, other: &Self)
pub fn reset_margin_left(&mut self, other: &Self)
Reset margin-left from the initial struct.
sourcepub fn clone_margin_left(&self) -> T
pub fn clone_margin_left(&self) -> T
Get the computed value for margin-left.
Trait Implementations§
source§impl MallocSizeOf for Margin
impl MallocSizeOf for Margin
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
impl StructuralPartialEq for Margin
Auto Trait Implementations§
impl Freeze for Margin
impl RefUnwindSafe for Margin
impl Send for Margin
impl Sync for Margin
impl Unpin for Margin
impl UnwindSafe for Margin
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert