Struct alexandria_tags::TagSet[][src]

pub struct TagSet(_);

A set of tags where every tag is unique

Simply construct a set via one of the From implementations of a containing type.

# use alexandria::data::TagSet;
# use std::collections::BTreeSet;
let _: TagSet = vec![].into();
let _: TagSet = BTreeSet::default().into();


impl TagSet[src]

pub fn empty() -> Self[src]

pub fn insert(&mut self, t: Tag)[src]

pub fn merge<T>(self, tags: T) -> Self where
    T: Into<Self>, 

Merge this and another tagset together into one

pub fn remove(&mut self, t: &Tag)[src]

pub fn contains(&self, t: &Tag) -> bool[src]

pub fn intersect(&self, o: &TagSet) -> bool[src]

Any overlap between self and o

pub fn subset(&self, o: &TagSet) -> bool[src]

A subset where o needs to be contained entirely in self

pub fn equality(&self, o: &TagSet) -> bool[src]

An equality set where o and self are the same

pub fn not(&self, o: &TagSet) -> bool[src]

No overlay between self and o

pub fn iter(&self) -> impl Iterator<Item = &Tag>[src]

Return an iterator over the inner collection

Trait Implementations

impl Clone for TagSet[src]

impl Debug for TagSet[src]

impl Default for TagSet[src]

impl<'de> Deserialize<'de> for TagSet[src]

impl Eq for TagSet[src]

impl From<&'_ Vec<Tag, Global>> for TagSet[src]

impl<'tag> From<&'tag Tag> for TagSet[src]

impl From<BTreeSet<Tag>> for TagSet[src]

impl From<Tag> for TagSet[src]

impl From<Vec<&'_ Tag, Global>> for TagSet[src]

impl From<Vec<Tag, Global>> for TagSet[src]

impl Hash for TagSet[src]

impl PartialEq<TagSet> for TagSet[src]

impl Serialize for TagSet[src]

impl StructuralEq for TagSet[src]

impl StructuralPartialEq for TagSet[src]

Auto Trait Implementations

impl RefUnwindSafe for TagSet

impl Send for TagSet

impl Sync for TagSet

impl Unpin for TagSet

impl UnwindSafe for TagSet

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.