pub struct MarginEdges {
pub top: EdgeValue,
pub right: EdgeValue,
pub bottom: EdgeValue,
pub left: EdgeValue,
}Expand description
Margin edges that support auto values.
Fields§
§top: EdgeValue§right: EdgeValue§bottom: EdgeValue§left: EdgeValueImplementations§
Source§impl MarginEdges
impl MarginEdges
Sourcepub fn horizontal(&self) -> f64
pub fn horizontal(&self) -> f64
Sum of resolved (non-auto) horizontal margins.
Sourcepub fn has_auto_horizontal(&self) -> bool
pub fn has_auto_horizontal(&self) -> bool
Whether any horizontal margin is auto.
Sourcepub fn has_auto_vertical(&self) -> bool
pub fn has_auto_vertical(&self) -> bool
Whether any vertical margin is auto.
Sourcepub fn from_edges(e: Edges) -> Self
pub fn from_edges(e: Edges) -> Self
Convert from plain Edges (all Pt values).
Trait Implementations§
Source§impl Clone for MarginEdges
impl Clone for MarginEdges
Source§fn clone(&self) -> MarginEdges
fn clone(&self) -> MarginEdges
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarginEdges
impl Debug for MarginEdges
Source§impl Default for MarginEdges
impl Default for MarginEdges
Source§fn default() -> MarginEdges
fn default() -> MarginEdges
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MarginEdges
impl<'de> Deserialize<'de> for MarginEdges
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for MarginEdges
impl Serialize for MarginEdges
impl Copy for MarginEdges
Auto Trait Implementations§
impl Freeze for MarginEdges
impl RefUnwindSafe for MarginEdges
impl Send for MarginEdges
impl Sync for MarginEdges
impl Unpin for MarginEdges
impl UnsafeUnpin for MarginEdges
impl UnwindSafe for MarginEdges
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