pub struct JsonKindSet(/* private fields */);Expand description
Set of JSON value JsonKind.
Implementations§
Source§impl JsonKindSet
impl JsonKindSet
Source§impl JsonKindSet
impl JsonKindSet
pub const fn none() -> Self
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub fn iter(&self) -> JsonKindSetIter ⓘ
Sourcepub fn as_disjunction(self) -> JsonKindSetDisjunction
pub fn as_disjunction(self) -> JsonKindSetDisjunction
Displays this set as a disjunction.
§Example
let set = JsonKind::Null | JsonKind::String | JsonKind::Object;
assert_eq!(set.as_disjunction().to_string(), "null, string or object");
assert_eq!(JsonKindSet::ARRAY.as_disjunction().to_string(), "array");
assert_eq!(JsonKindSet::all().as_disjunction().to_string(), "anything");
assert_eq!(JsonKindSet::none().as_disjunction().to_string(), "nothing");Sourcepub fn as_conjunction(self) -> JsonKindSetConjunction
pub fn as_conjunction(self) -> JsonKindSetConjunction
Displays this set as a conjunction.
§Example
let set = JsonKind::Null | JsonKind::String | JsonKind::Object;
assert_eq!(set.as_conjunction().to_string(), "null, string and object");
assert_eq!(JsonKindSet::ARRAY.as_conjunction().to_string(), "array");
assert_eq!(JsonKindSet::all().as_conjunction().to_string(), "anything");
assert_eq!(JsonKindSet::none().as_conjunction().to_string(), "nothing");Trait Implementations§
Source§impl BitAnd for JsonKindSet
impl BitAnd for JsonKindSet
Source§impl BitAnd<JsonKind> for JsonKindSet
impl BitAnd<JsonKind> for JsonKindSet
Source§impl BitAnd<JsonKindSet> for JsonKind
impl BitAnd<JsonKindSet> for JsonKind
Source§type Output = JsonKindSet
type Output = JsonKindSet
The resulting type after applying the
& operator.Source§fn bitand(self, other: JsonKindSet) -> JsonKindSet
fn bitand(self, other: JsonKindSet) -> JsonKindSet
Performs the
& operation. Read moreSource§impl BitAndAssign for JsonKindSet
impl BitAndAssign for JsonKindSet
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&= operation. Read moreSource§impl BitAndAssign<JsonKind> for JsonKindSet
impl BitAndAssign<JsonKind> for JsonKindSet
Source§fn bitand_assign(&mut self, other: JsonKind)
fn bitand_assign(&mut self, other: JsonKind)
Performs the
&= operation. Read moreSource§impl BitOr for JsonKindSet
impl BitOr for JsonKindSet
Source§impl BitOr<JsonKind> for JsonKindSet
impl BitOr<JsonKind> for JsonKindSet
Source§impl BitOr<JsonKindSet> for JsonKind
impl BitOr<JsonKindSet> for JsonKind
Source§type Output = JsonKindSet
type Output = JsonKindSet
The resulting type after applying the
| operator.Source§fn bitor(self, other: JsonKindSet) -> JsonKindSet
fn bitor(self, other: JsonKindSet) -> JsonKindSet
Performs the
| operation. Read moreSource§impl BitOrAssign for JsonKindSet
impl BitOrAssign for JsonKindSet
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|= operation. Read moreSource§impl BitOrAssign<JsonKind> for JsonKindSet
impl BitOrAssign<JsonKind> for JsonKindSet
Source§fn bitor_assign(&mut self, other: JsonKind)
fn bitor_assign(&mut self, other: JsonKind)
Performs the
|= operation. Read moreSource§impl Clone for JsonKindSet
impl Clone for JsonKindSet
impl Copy for JsonKindSet
Source§impl Debug for JsonKindSet
impl Debug for JsonKindSet
Source§impl Default for JsonKindSet
impl Default for JsonKindSet
Source§impl Display for JsonKindSet
impl Display for JsonKindSet
impl Eq for JsonKindSet
Source§impl From<JsonKind> for JsonKindSet
impl From<JsonKind> for JsonKindSet
Source§impl Hash for JsonKindSet
impl Hash for JsonKindSet
Source§impl IntoIterator for &JsonKindSet
impl IntoIterator for &JsonKindSet
Source§impl IntoIterator for JsonKindSet
impl IntoIterator for JsonKindSet
Source§impl Ord for JsonKindSet
impl Ord for JsonKindSet
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for JsonKindSet
impl PartialEq for JsonKindSet
Source§impl PartialOrd for JsonKindSet
impl PartialOrd for JsonKindSet
impl StructuralPartialEq for JsonKindSet
Auto Trait Implementations§
impl Freeze for JsonKindSet
impl RefUnwindSafe for JsonKindSet
impl Send for JsonKindSet
impl Sync for JsonKindSet
impl Unpin for JsonKindSet
impl UnsafeUnpin for JsonKindSet
impl UnwindSafe for JsonKindSet
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> Comparable<K> for Q
impl<Q, K> Comparable<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.