pub struct Range<T> {
pub min: T,
pub max: T,
}
Fields
min: T
max: T
Implementations
sourceimpl<T> Range<T>
impl<T> Range<T>
pub fn range_from<U>(r: Range<U>) -> Self where
T: From<U>,
pub fn from_scalar(v: T) -> Self where
T: Clone,
Trait Implementations
sourceimpl<'de, T> Deserialize<'de> for Range<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Range<T> where
T: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T: Ord> Ord for Range<T>
impl<T: Ord> Ord for Range<T>
sourceimpl<T: PartialOrd> PartialOrd<Range<T>> for Range<T>
impl<T: PartialOrd> PartialOrd<Range<T>> for Range<T>
sourcefn partial_cmp(&self, other: &Range<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &Range<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<T: Copy> Copy for Range<T>
impl<T: Eq> Eq for Range<T>
impl<T> StructuralEq for Range<T>
impl<T> StructuralPartialEq for Range<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Range<T> where
T: RefUnwindSafe,
impl<T> Send for Range<T> where
T: Send,
impl<T> Sync for Range<T> where
T: Sync,
impl<T> Unpin for Range<T> where
T: Unpin,
impl<T> UnwindSafe for Range<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more