pub struct LegendSpacing { /* private fields */ }Expand description
Complete immutable LegendSpacing appearance component.
Implementations§
Source§impl LegendSpacing
impl LegendSpacing
Sourcepub fn new(
padding: Insets,
key_width: RelativeSpacing,
key_label_gap: RelativeSpacing,
outside_gap: RelativeSpacing,
shared_gap: RelativeSpacing,
entry_gap: GridGap,
title_gap: RelativeSpacing,
glyph_edge_padding: RelativeSpacing,
inside_inset: Insets,
outside_inset: Insets,
) -> Result<Self>
pub fn new( padding: Insets, key_width: RelativeSpacing, key_label_gap: RelativeSpacing, outside_gap: RelativeSpacing, shared_gap: RelativeSpacing, entry_gap: GridGap, title_gap: RelativeSpacing, glyph_edge_padding: RelativeSpacing, inside_inset: Insets, outside_inset: Insets, ) -> Result<Self>
Construct a complete component, validating all fields and sibling constraints.
Sourcepub fn get_padding(&self) -> &Insets
pub fn get_padding(&self) -> &Insets
Borrow the complete padding value.
Sourcepub fn padding(self, value: Insets) -> Result<Self>
pub fn padding(self, value: Insets) -> Result<Self>
Replace only padding, validating the complete resulting component.
Sourcepub fn get_key_width(&self) -> &RelativeSpacing
pub fn get_key_width(&self) -> &RelativeSpacing
Borrow the complete key_width value.
Sourcepub fn key_width(self, value: RelativeSpacing) -> Result<Self>
pub fn key_width(self, value: RelativeSpacing) -> Result<Self>
Replace only key_width, validating the complete resulting component.
Sourcepub fn get_key_label_gap(&self) -> &RelativeSpacing
pub fn get_key_label_gap(&self) -> &RelativeSpacing
Borrow the complete key_label_gap value.
Sourcepub fn key_label_gap(self, value: RelativeSpacing) -> Result<Self>
pub fn key_label_gap(self, value: RelativeSpacing) -> Result<Self>
Replace only key_label_gap, validating the complete resulting component.
Sourcepub fn get_outside_gap(&self) -> &RelativeSpacing
pub fn get_outside_gap(&self) -> &RelativeSpacing
Borrow the complete outside_gap value.
Sourcepub fn outside_gap(self, value: RelativeSpacing) -> Result<Self>
pub fn outside_gap(self, value: RelativeSpacing) -> Result<Self>
Replace only outside_gap, validating the complete resulting component.
Borrow the complete shared_gap value.
Replace only shared_gap, validating the complete resulting component.
Sourcepub fn get_entry_gap(&self) -> &GridGap
pub fn get_entry_gap(&self) -> &GridGap
Borrow the complete entry_gap value.
Sourcepub fn entry_gap(self, value: GridGap) -> Result<Self>
pub fn entry_gap(self, value: GridGap) -> Result<Self>
Replace only entry_gap, validating the complete resulting component.
Sourcepub fn get_title_gap(&self) -> &RelativeSpacing
pub fn get_title_gap(&self) -> &RelativeSpacing
Borrow the complete title_gap value.
Sourcepub fn title_gap(self, value: RelativeSpacing) -> Result<Self>
pub fn title_gap(self, value: RelativeSpacing) -> Result<Self>
Replace only title_gap, validating the complete resulting component.
Sourcepub fn get_glyph_edge_padding(&self) -> &RelativeSpacing
pub fn get_glyph_edge_padding(&self) -> &RelativeSpacing
Borrow the complete glyph_edge_padding value.
Sourcepub fn glyph_edge_padding(self, value: RelativeSpacing) -> Result<Self>
pub fn glyph_edge_padding(self, value: RelativeSpacing) -> Result<Self>
Replace only glyph_edge_padding, validating the complete resulting component.
Sourcepub fn get_inside_inset(&self) -> &Insets
pub fn get_inside_inset(&self) -> &Insets
Borrow the complete inside_inset value.
Sourcepub fn inside_inset(self, value: Insets) -> Result<Self>
pub fn inside_inset(self, value: Insets) -> Result<Self>
Replace only inside_inset, validating the complete resulting component.
Sourcepub fn get_outside_inset(&self) -> &Insets
pub fn get_outside_inset(&self) -> &Insets
Borrow the complete outside_inset value.
Sourcepub fn outside_inset(self, value: Insets) -> Result<Self>
pub fn outside_inset(self, value: Insets) -> Result<Self>
Replace only outside_inset, validating the complete resulting component.
Trait Implementations§
Source§impl Clone for LegendSpacing
impl Clone for LegendSpacing
Source§impl Debug for LegendSpacing
impl Debug for LegendSpacing
impl Eq for LegendSpacing
Source§impl PartialEq for LegendSpacing
impl PartialEq for LegendSpacing
impl StructuralPartialEq for LegendSpacing
Auto Trait Implementations§
impl Forget for LegendSpacing
impl Freeze for LegendSpacingwhere
*const ArcInner<SpacingPayload> is !null: Freeze,
PhantomData<ArcInner<SpacingPayload>>: Freeze,
impl Move for LegendSpacing
impl RefUnwindSafe for LegendSpacing
impl Send for LegendSpacing
impl Sync for LegendSpacing
impl Unpin for LegendSpacing
impl UnsafeUnpin for LegendSpacingwhere
*const ArcInner<SpacingPayload> is !null: UnsafeUnpin,
PhantomData<ArcInner<SpacingPayload>>: UnsafeUnpin,
impl UnwindSafe for LegendSpacingwhere
Arc<SpacingPayload>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.