pub enum CharacterSet {
Top,
Value(BTreeSet<char>),
}
Expand description
A domain that represents character sets.
Variants§
Top
The Top value represents a character set of all allowed characters.
Value(BTreeSet<char>)
Represents a real subset of all allowed characters.
Implementations§
source§impl CharacterSet
impl CharacterSet
sourcepub fn unwrap_value(&self) -> BTreeSet<char>
pub fn unwrap_value(&self) -> BTreeSet<char>
Unwraps the values from the CharacterSet
sourcepub fn intersection(&self, other: Self) -> Self
pub fn intersection(&self, other: Self) -> Self
Takes the intersection of two character sets. None of the sets should be Top since otherwise the whole CharacterInclusionDomain would be Top which is checked beforehand.
Trait Implementations§
source§impl Clone for CharacterSet
impl Clone for CharacterSet
source§fn clone(&self) -> CharacterSet
fn clone(&self) -> CharacterSet
Returns a copy of the value. Read more
1.0.0 · 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 CharacterSet
impl Debug for CharacterSet
source§impl<'de> Deserialize<'de> for CharacterSet
impl<'de> Deserialize<'de> for CharacterSet
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for CharacterSet
impl Display for CharacterSet
source§impl PartialEq for CharacterSet
impl PartialEq for CharacterSet
source§fn eq(&self, other: &CharacterSet) -> bool
fn eq(&self, other: &CharacterSet) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CharacterSet
impl Serialize for CharacterSet
impl Eq for CharacterSet
impl StructuralEq for CharacterSet
impl StructuralPartialEq for CharacterSet
Auto Trait Implementations§
impl RefUnwindSafe for CharacterSet
impl Send for CharacterSet
impl Sync for CharacterSet
impl Unpin for CharacterSet
impl UnwindSafe for CharacterSet
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
§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
Checks if this value is equivalent to the given key. Read more
§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.