Enum ion_schema::isl::ranges::Limit
source · pub enum Limit<T> {
Unbounded,
Inclusive(T),
Exclusive(T),
}
Expand description
An end (upper or lower) of a [Range
].
Variants§
Unbounded
Indicates that the end of a range has no limit or appears to have no limit.
For example, when NumberRange::lower() == Unbounded
, there is no actual limit to the lower
end of the range—it is effectively negative infinity. On the other hand, for a finite type
such as i64
, when I64Range::upper() == Unbounded
, it appears that there is no limit to
the upper end of the range because then the upper limit of the range is effectively the
maximum value that can be represented by i64
.
Unbounded
is represented in Ion Schema Language as min
or max
, depending on the
position in which it occurs.
Inclusive(T)
Indicates that the end of the range includes the given value.
Exclusive(T)
Indicates that the end of the range excludes the given value.
Trait Implementations§
source§impl<T: PartialEq> PartialEq for Limit<T>
impl<T: PartialEq> PartialEq for Limit<T>
impl<T> StructuralPartialEq for Limit<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Limit<T>where
T: RefUnwindSafe,
impl<T> Send for Limit<T>where
T: Send,
impl<T> Sync for Limit<T>where
T: Sync,
impl<T> Unpin for Limit<T>where
T: Unpin,
impl<T> UnwindSafe for Limit<T>where
T: UnwindSafe,
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