pub enum SectionSelection {
Default,
Explicit(Vec<String>),
}Expand description
Which sections to show, and in what order.
Variants§
Default
User did not customise: every default_enabled section, sorted by
order (ties by id).
Explicit(Vec<String>)
User pinned an explicit ordered list of ids (from dashboard.sections).
Only these show, in this order; unknown ids are skipped with a warning.
Implementations§
Source§impl SectionSelection
impl SectionSelection
Sourcepub fn parse(raw: &str) -> Self
pub fn parse(raw: &str) -> Self
Parse the dashboard.sections option value. Empty/whitespace ⇒
SectionSelection::Default; otherwise the ids split on commas
and/or whitespace, in order, de-duplicated (first occurrence wins).
Trait Implementations§
Source§impl Clone for SectionSelection
impl Clone for SectionSelection
Source§fn clone(&self) -> SectionSelection
fn clone(&self) -> SectionSelection
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 SectionSelection
impl Debug for SectionSelection
impl Eq for SectionSelection
Source§impl PartialEq for SectionSelection
impl PartialEq for SectionSelection
impl StructuralPartialEq for SectionSelection
Auto Trait Implementations§
impl Freeze for SectionSelection
impl RefUnwindSafe for SectionSelection
impl Send for SectionSelection
impl Sync for SectionSelection
impl Unpin for SectionSelection
impl UnsafeUnpin for SectionSelection
impl UnwindSafe for SectionSelection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.