pub enum Limit<T> {
Min,
Max,
Inclusive(T),
Exclusive(T),
}Expand description
An end (upper or lower) of a [Range].
Variants§
Min
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.
Max
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: PartialOrd> PartialEq<T> for Limit<T>
impl<T: PartialOrd> PartialEq<T> for Limit<T>
Source§impl<T: PartialOrd> PartialOrd<T> for Limit<T>
impl<T: PartialOrd> PartialOrd<T> for Limit<T>
Source§impl<T: WriteAsIon> WriteAsIon for Limit<T>
impl<T: WriteAsIon> WriteAsIon for Limit<T>
Source§fn write_as_ion<V: ValueWriter>(&self, writer: V) -> IonResult<()>
fn write_as_ion<V: ValueWriter>(&self, writer: V) -> IonResult<()>
Maps this value to the Ion data model using the provided
ValueWriter implementation.Source§fn encode_as<E, C>(
&self,
config: C,
) -> Result<<E as Encoding>::Output, IonError>
fn encode_as<E, C>( &self, config: C, ) -> Result<<E as Encoding>::Output, IonError>
Encodes this value as an Ion stream with
self as the single top-level value.
If the requested encoding is binary of any version, returns a Vec<u8> containing the
encoded bytes. If the requested encoding is text of any version, returns a String instead. Read moreimpl<T> StructuralPartialEq for Limit<T>
Auto Trait Implementations§
impl<T> Freeze for Limit<T>where
T: Freeze,
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> UnsafeUnpin for Limit<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Limit<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> Annotatable for Twhere
T: WriteAsIon + ?Sized,
impl<T> Annotatable for Twhere
T: WriteAsIon + ?Sized,
Source§fn annotated_with<'a, A>(&'a self, annotations: A) -> Annotated<'a, T, A>where
A: 'a,
&'a A: AnnotationSeq<'a>,
fn annotated_with<'a, A>(&'a self, annotations: A) -> Annotated<'a, T, A>where
A: 'a,
&'a A: AnnotationSeq<'a>,
Pairs a reference to the provided value with a slice containing annotations. Read more
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<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more