pub struct CategoryLabelSelection { /* private fields */ }Expand description
Label eligibility only: categories, ticks, grid lines and marks remain complete.
use lichtung_plot::{CategoryLabelSelection, LabelEndpoints};
let months = CategoryLabelSelection::every(2)?;
let shifted = months.offset(1)?.endpoints(LabelEndpoints::Both);Implementations§
Source§impl CategoryLabelSelection
impl CategoryLabelSelection
Sourcepub const fn all() -> CategoryLabelSelection
pub const fn all() -> CategoryLabelSelection
Make every category label eligible (the default).
Sourcepub fn every(stride: usize) -> Result<CategoryLabelSelection, Error>
pub fn every(stride: usize) -> Result<CategoryLabelSelection, Error>
Select every positive-stride label, initially at offset zero without endpoints.
Sourcepub fn offset(self, offset: usize) -> Result<CategoryLabelSelection, Error>
pub fn offset(self, offset: usize) -> Result<CategoryLabelSelection, Error>
Select the zero-based offset, strictly less than the configured stride.
Sourcepub const fn endpoints(self, value: LabelEndpoints) -> CategoryLabelSelection
pub const fn endpoints(self, value: LabelEndpoints) -> CategoryLabelSelection
Union full-domain endpoints into the selected indices. All stays normalized.
Trait Implementations§
Source§impl Clone for CategoryLabelSelection
impl Clone for CategoryLabelSelection
Source§fn clone(&self) -> CategoryLabelSelection
fn clone(&self) -> CategoryLabelSelection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CategoryLabelSelection
impl Debug for CategoryLabelSelection
Source§impl Default for CategoryLabelSelection
impl Default for CategoryLabelSelection
Source§fn default() -> CategoryLabelSelection
fn default() -> CategoryLabelSelection
Returns the “default value” for a type. Read more
impl Eq for CategoryLabelSelection
Source§impl PartialEq for CategoryLabelSelection
impl PartialEq for CategoryLabelSelection
impl StructuralPartialEq for CategoryLabelSelection
Auto Trait Implementations§
impl Forget for CategoryLabelSelection
impl Freeze for CategoryLabelSelection
impl Move for CategoryLabelSelection
impl RefUnwindSafe for CategoryLabelSelection
impl Send for CategoryLabelSelection
impl Sync for CategoryLabelSelection
impl Unpin for CategoryLabelSelection
impl UnsafeUnpin for CategoryLabelSelection
impl UnwindSafe for CategoryLabelSelection
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
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.