pub struct M2dirFlags(/* private fields */);Expand description
Set of flags attached to an m2dir entry.
Each flag is an arbitrary UTF-8 string; serialization to the
.meta/<id>.flags metadata file is one flag per line.
Implementations§
Source§impl M2dirFlags
impl M2dirFlags
Sourcepub fn iter(&self) -> impl Iterator<Item = &str>
pub fn iter(&self) -> impl Iterator<Item = &str>
Returns an iterator over the flags in this set.
Sourcepub fn insert(&mut self, flag: impl Into<String>) -> bool
pub fn insert(&mut self, flag: impl Into<String>) -> bool
Inserts a flag into the set. Returns true if it was not
already present.
Sourcepub fn remove(&mut self, flag: &str) -> bool
pub fn remove(&mut self, flag: &str) -> bool
Removes a flag from the set. Returns true if it was present.
Sourcepub fn extend(&mut self, flags: M2dirFlags)
pub fn extend(&mut self, flags: M2dirFlags)
Adds every flag from flags to this set.
Sourcepub fn difference(&mut self, flags: &M2dirFlags)
pub fn difference(&mut self, flags: &M2dirFlags)
Removes every flag in flags from this set.
Trait Implementations§
Source§impl Clone for M2dirFlags
impl Clone for M2dirFlags
Source§fn clone(&self) -> M2dirFlags
fn clone(&self) -> M2dirFlags
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 M2dirFlags
impl Debug for M2dirFlags
Source§impl Default for M2dirFlags
impl Default for M2dirFlags
Source§fn default() -> M2dirFlags
fn default() -> M2dirFlags
Returns the “default value” for a type. Read more
Source§impl Display for M2dirFlags
impl Display for M2dirFlags
impl Eq for M2dirFlags
Source§impl From<M2dirFlags> for BTreeSet<String>
impl From<M2dirFlags> for BTreeSet<String>
Source§fn from(flags: M2dirFlags) -> Self
fn from(flags: M2dirFlags) -> Self
Converts to this type from the input type.
Source§impl<'a> FromIterator<&'a str> for M2dirFlags
impl<'a> FromIterator<&'a str> for M2dirFlags
Source§impl FromIterator<String> for M2dirFlags
impl FromIterator<String> for M2dirFlags
Source§impl Ord for M2dirFlags
impl Ord for M2dirFlags
Source§fn cmp(&self, other: &M2dirFlags) -> Ordering
fn cmp(&self, other: &M2dirFlags) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for M2dirFlags
impl PartialEq for M2dirFlags
Source§fn eq(&self, other: &M2dirFlags) -> bool
fn eq(&self, other: &M2dirFlags) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for M2dirFlags
impl PartialOrd for M2dirFlags
impl StructuralPartialEq for M2dirFlags
Auto Trait Implementations§
impl Freeze for M2dirFlags
impl RefUnwindSafe for M2dirFlags
impl Send for M2dirFlags
impl Sync for M2dirFlags
impl Unpin for M2dirFlags
impl UnsafeUnpin for M2dirFlags
impl UnwindSafe for M2dirFlags
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