Struct alexandria_tags::TagSet [−][src]
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();
Implementations
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>,
[src]
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TagSet> for TagSet
[src]
impl Serialize for TagSet
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,