pub struct Layers {
pub index: bool,
pub colours: bool,
pub attachments: bool,
}Expand description
Which layers are on. Every one is off by default and turned on by name.
let layers = Layers::none().with_index().with_colours();
assert!(layers.index && layers.colours && !layers.attachments);Fields§
§index: boolThe package index.
colours: boolThe colour walks (derived from the index).
attachments: boolThe attachment listings (derived from the index).
Implementations§
Source§impl Layers
impl Layers
Sourcepub const fn with_index(self) -> Self
pub const fn with_index(self) -> Self
Turn the index on.
Sourcepub const fn with_colours(self) -> Self
pub const fn with_colours(self) -> Self
Turn the colour walks on.
Sourcepub const fn with_attachments(self) -> Self
pub const fn with_attachments(self) -> Self
Turn the attachment listings on.
Sourcepub const fn normalised(self) -> Self
pub const fn normalised(self) -> Self
The layers with what they stand on turned on too: a layer derived from the index has no index to be exact for when the index is off.
Trait Implementations§
impl Copy for Layers
impl Eq for Layers
impl StructuralPartialEq for Layers
Auto Trait Implementations§
impl Freeze for Layers
impl RefUnwindSafe for Layers
impl Send for Layers
impl Sync for Layers
impl Unpin for Layers
impl UnsafeUnpin for Layers
impl UnwindSafe for Layers
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,
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
Compare self to
key and return true if they are equal.