pub struct AxisSpacing { /* private fields */ }Expand description
Exact independent axis gaps, resolved from tick-label or axis-title em.
Implementations§
Source§impl AxisSpacing
impl AxisSpacing
Sourcepub fn new(
x_tick_label_gap: RelativeSpacing,
y_tick_label_gap: RelativeSpacing,
x_title_tick_label_gap: RelativeSpacing,
x_title_without_tick_labels_gap: RelativeSpacing,
y_title_tick_label_gap: RelativeSpacing,
y_title_edge_padding: RelativeSpacing,
) -> Result<Self>
pub fn new( x_tick_label_gap: RelativeSpacing, y_tick_label_gap: RelativeSpacing, x_title_tick_label_gap: RelativeSpacing, x_title_without_tick_labels_gap: RelativeSpacing, y_title_tick_label_gap: RelativeSpacing, y_title_edge_padding: RelativeSpacing, ) -> Result<Self>
Construct all six nonnegative local spacing relationships.
Sourcepub fn get_x_tick_label_gap(&self) -> &RelativeSpacing
pub fn get_x_tick_label_gap(&self) -> &RelativeSpacing
Borrow the exact x_tick_label_gap relationship.
Sourcepub fn x_tick_label_gap(self, value: RelativeSpacing) -> Result<Self>
pub fn x_tick_label_gap(self, value: RelativeSpacing) -> Result<Self>
Replace only the x_tick_label_gap relationship.
Sourcepub fn get_y_tick_label_gap(&self) -> &RelativeSpacing
pub fn get_y_tick_label_gap(&self) -> &RelativeSpacing
Borrow the exact y_tick_label_gap relationship.
Sourcepub fn y_tick_label_gap(self, value: RelativeSpacing) -> Result<Self>
pub fn y_tick_label_gap(self, value: RelativeSpacing) -> Result<Self>
Replace only the y_tick_label_gap relationship.
Sourcepub fn get_x_title_tick_label_gap(&self) -> &RelativeSpacing
pub fn get_x_title_tick_label_gap(&self) -> &RelativeSpacing
Borrow the exact x_title_tick_label_gap relationship.
Sourcepub fn x_title_tick_label_gap(self, value: RelativeSpacing) -> Result<Self>
pub fn x_title_tick_label_gap(self, value: RelativeSpacing) -> Result<Self>
Replace only the x_title_tick_label_gap relationship.
Sourcepub fn get_x_title_without_tick_labels_gap(&self) -> &RelativeSpacing
pub fn get_x_title_without_tick_labels_gap(&self) -> &RelativeSpacing
Borrow the exact x_title_without_tick_labels_gap relationship.
Sourcepub fn x_title_without_tick_labels_gap(
self,
value: RelativeSpacing,
) -> Result<Self>
pub fn x_title_without_tick_labels_gap( self, value: RelativeSpacing, ) -> Result<Self>
Replace only the x_title_without_tick_labels_gap relationship.
Sourcepub fn get_y_title_tick_label_gap(&self) -> &RelativeSpacing
pub fn get_y_title_tick_label_gap(&self) -> &RelativeSpacing
Borrow the exact y_title_tick_label_gap relationship.
Sourcepub fn y_title_tick_label_gap(self, value: RelativeSpacing) -> Result<Self>
pub fn y_title_tick_label_gap(self, value: RelativeSpacing) -> Result<Self>
Replace only the y_title_tick_label_gap relationship.
Sourcepub fn get_y_title_edge_padding(&self) -> &RelativeSpacing
pub fn get_y_title_edge_padding(&self) -> &RelativeSpacing
Borrow the exact y_title_edge_padding relationship.
Sourcepub fn y_title_edge_padding(self, value: RelativeSpacing) -> Result<Self>
pub fn y_title_edge_padding(self, value: RelativeSpacing) -> Result<Self>
Replace only the y_title_edge_padding relationship.
Trait Implementations§
Source§impl Clone for AxisSpacing
impl Clone for AxisSpacing
Source§impl Debug for AxisSpacing
impl Debug for AxisSpacing
impl Eq for AxisSpacing
Source§impl PartialEq for AxisSpacing
impl PartialEq for AxisSpacing
impl StructuralPartialEq for AxisSpacing
Auto Trait Implementations§
impl Forget for AxisSpacing
impl Freeze for AxisSpacingwhere
*const ArcInner<SpacingPayload> is !null: Freeze,
PhantomData<ArcInner<SpacingPayload>>: Freeze,
impl Move for AxisSpacing
impl RefUnwindSafe for AxisSpacing
impl Send for AxisSpacing
impl Sync for AxisSpacing
impl Unpin for AxisSpacing
impl UnsafeUnpin for AxisSpacingwhere
*const ArcInner<SpacingPayload> is !null: UnsafeUnpin,
PhantomData<ArcInner<SpacingPayload>>: UnsafeUnpin,
impl UnwindSafe for AxisSpacingwhere
Arc<SpacingPayload>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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.