pub struct JsonTypeSet(/* private fields */);Expand description
A set of JSON types.
Implementations§
Source§impl JsonTypeSet
impl JsonTypeSet
Sourcepub const fn insert(self, ty: JsonType) -> Self
pub const fn insert(self, ty: JsonType) -> Self
Add a type to this set and return the modified set.
Sourcepub const fn remove(self, ty: JsonType) -> Self
pub const fn remove(self, ty: JsonType) -> Self
Remove a type from this set and return the modified set.
Sourcepub fn contains_value_type<F: Json>(self, value: &F::Node<'_>) -> bool
pub fn contains_value_type<F: Json>(self, value: &F::Node<'_>) -> bool
Whether a JSON value’s type is allowed by this set.
Sourcepub fn iter(&self) -> JsonTypeSetIterator ⓘ
pub fn iter(&self) -> JsonTypeSetIterator ⓘ
Get an iterator over the types in this set.
Trait Implementations§
Source§impl BitOr<JsonType> for JsonTypeSet
impl BitOr<JsonType> for JsonTypeSet
Source§type Output = JsonTypeSet
type Output = JsonTypeSet
The resulting type after applying the
| operator.Source§impl Clone for JsonTypeSet
impl Clone for JsonTypeSet
Source§fn clone(&self) -> JsonTypeSet
fn clone(&self) -> JsonTypeSet
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 moreimpl Copy for JsonTypeSet
Source§impl Debug for JsonTypeSet
impl Debug for JsonTypeSet
Source§impl Default for JsonTypeSet
impl Default for JsonTypeSet
impl Eq for JsonTypeSet
Source§impl From<JsonType> for JsonTypeSet
impl From<JsonType> for JsonTypeSet
Source§impl Hash for JsonTypeSet
impl Hash for JsonTypeSet
Source§impl IntoIterator for &JsonTypeSet
impl IntoIterator for &JsonTypeSet
Source§impl IntoIterator for JsonTypeSet
impl IntoIterator for JsonTypeSet
Source§impl Ord for JsonTypeSet
impl Ord for JsonTypeSet
Source§fn cmp(&self, other: &JsonTypeSet) -> Ordering
fn cmp(&self, other: &JsonTypeSet) -> 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 JsonTypeSet
impl PartialEq for JsonTypeSet
Source§impl PartialOrd for JsonTypeSet
impl PartialOrd for JsonTypeSet
impl StructuralPartialEq for JsonTypeSet
Auto Trait Implementations§
impl Freeze for JsonTypeSet
impl RefUnwindSafe for JsonTypeSet
impl Send for JsonTypeSet
impl Sync for JsonTypeSet
impl Unpin for JsonTypeSet
impl UnsafeUnpin for JsonTypeSet
impl UnwindSafe for JsonTypeSet
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