Struct style::properties::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.
sourcepub fn set_margin_block_start(&mut self, v: T, wm: WritingMode)
pub fn set_margin_block_start(&mut self, v: T, wm: WritingMode)
Set the appropriate physical property for margin-block-start given a writing mode.
sourcepub fn copy_margin_block_start_from(&mut self, other: &Self, wm: WritingMode)
pub fn copy_margin_block_start_from(&mut self, other: &Self, wm: WritingMode)
Copy the appropriate physical property from another struct for margin-block-start given a writing mode.
sourcepub fn reset_margin_block_start(&mut self, other: &Self, wm: WritingMode)
pub fn reset_margin_block_start(&mut self, other: &Self, wm: WritingMode)
Copy the appropriate physical property from another struct for margin-block-start given a writing mode.
sourcepub fn clone_margin_block_start(&self, wm: WritingMode) -> T
pub fn clone_margin_block_start(&self, wm: WritingMode) -> T
Get the computed value for the appropriate physical property for margin-block-start given a writing mode.
sourcepub fn set_margin_block_end(&mut self, v: T, wm: WritingMode)
pub fn set_margin_block_end(&mut self, v: T, wm: WritingMode)
Set the appropriate physical property for margin-block-end given a writing mode.
sourcepub fn copy_margin_block_end_from(&mut self, other: &Self, wm: WritingMode)
pub fn copy_margin_block_end_from(&mut self, other: &Self, wm: WritingMode)
Copy the appropriate physical property from another struct for margin-block-end given a writing mode.
sourcepub fn reset_margin_block_end(&mut self, other: &Self, wm: WritingMode)
pub fn reset_margin_block_end(&mut self, other: &Self, wm: WritingMode)
Copy the appropriate physical property from another struct for margin-block-end given a writing mode.
sourcepub fn clone_margin_block_end(&self, wm: WritingMode) -> T
pub fn clone_margin_block_end(&self, wm: WritingMode) -> T
Get the computed value for the appropriate physical property for margin-block-end given a writing mode.
sourcepub fn set_margin_inline_start(&mut self, v: T, wm: WritingMode)
pub fn set_margin_inline_start(&mut self, v: T, wm: WritingMode)
Set the appropriate physical property for margin-inline-start given a writing mode.
sourcepub fn copy_margin_inline_start_from(&mut self, other: &Self, wm: WritingMode)
pub fn copy_margin_inline_start_from(&mut self, other: &Self, wm: WritingMode)
Copy the appropriate physical property from another struct for margin-inline-start given a writing mode.
sourcepub fn reset_margin_inline_start(&mut self, other: &Self, wm: WritingMode)
pub fn reset_margin_inline_start(&mut self, other: &Self, wm: WritingMode)
Copy the appropriate physical property from another struct for margin-inline-start given a writing mode.
sourcepub fn clone_margin_inline_start(&self, wm: WritingMode) -> T
pub fn clone_margin_inline_start(&self, wm: WritingMode) -> T
Get the computed value for the appropriate physical property for margin-inline-start given a writing mode.
sourcepub fn set_margin_inline_end(&mut self, v: T, wm: WritingMode)
pub fn set_margin_inline_end(&mut self, v: T, wm: WritingMode)
Set the appropriate physical property for margin-inline-end given a writing mode.
sourcepub fn copy_margin_inline_end_from(&mut self, other: &Self, wm: WritingMode)
pub fn copy_margin_inline_end_from(&mut self, other: &Self, wm: WritingMode)
Copy the appropriate physical property from another struct for margin-inline-end given a writing mode.
sourcepub fn reset_margin_inline_end(&mut self, other: &Self, wm: WritingMode)
pub fn reset_margin_inline_end(&mut self, other: &Self, wm: WritingMode)
Copy the appropriate physical property from another struct for margin-inline-end given a writing mode.
sourcepub fn clone_margin_inline_end(&self, wm: WritingMode) -> T
pub fn clone_margin_inline_end(&self, wm: WritingMode) -> T
Get the computed value for the appropriate physical property for margin-inline-end given a writing mode.