pub struct CanonicalValueSet(/* private fields */);Expand description
A non-empty exact-domain canonical value set.
Implementations§
Source§impl CanonicalValueSet
impl CanonicalValueSet
Sourcepub fn new(
values: impl IntoIterator<Item = CanonicalValue>,
) -> Result<Self, Diagnostic>
pub fn new( values: impl IntoIterator<Item = CanonicalValue>, ) -> Result<Self, Diagnostic>
Validate a set, rejecting empty, mixed-domain, and duplicate input.
Sourcepub fn new_detailed(
values: impl IntoIterator<Item = CanonicalValue>,
) -> Result<Self, CanonicalValueSetViolation>
pub fn new_detailed( values: impl IntoIterator<Item = CanonicalValue>, ) -> Result<Self, CanonicalValueSetViolation>
Validate a raw sequence while retaining member indices for source diagnostics.
Sourcepub fn iter(&self) -> impl ExactSizeIterator<Item = &CanonicalValue>
pub fn iter(&self) -> impl ExactSizeIterator<Item = &CanonicalValue>
Return values in canonical order.
Trait Implementations§
Source§impl Clone for CanonicalValueSet
impl Clone for CanonicalValueSet
Source§fn clone(&self) -> CanonicalValueSet
fn clone(&self) -> CanonicalValueSet
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 moreSource§impl Debug for CanonicalValueSet
impl Debug for CanonicalValueSet
impl Eq for CanonicalValueSet
Source§impl Ord for CanonicalValueSet
impl Ord for CanonicalValueSet
Source§fn cmp(&self, other: &CanonicalValueSet) -> Ordering
fn cmp(&self, other: &CanonicalValueSet) -> 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
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 CanonicalValueSet
impl PartialEq for CanonicalValueSet
Source§impl PartialOrd for CanonicalValueSet
impl PartialOrd for CanonicalValueSet
Source§impl Serialize for CanonicalValueSet
impl Serialize for CanonicalValueSet
impl StructuralPartialEq for CanonicalValueSet
Auto Trait Implementations§
impl Freeze for CanonicalValueSet
impl RefUnwindSafe for CanonicalValueSet
impl Send for CanonicalValueSet
impl Sync for CanonicalValueSet
impl Unpin for CanonicalValueSet
impl UnsafeUnpin for CanonicalValueSet
impl UnwindSafe for CanonicalValueSet
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