Enum plutus_ledger_api::v1::interval::Interval
source · pub enum Interval<T> {
Finite(T, T),
StartAt(T),
EndAt(T),
Always,
Never,
}
Expand description
An abstraction over PlutusInterval
, allowing valid values only
Variants§
Trait Implementations§
source§impl<T> From<Interval<T>> for PlutusInterval<T>where
T: FeatureTraits,
impl<T> From<Interval<T>> for PlutusInterval<T>where
T: FeatureTraits,
Loosely following the CTL implementation of intervalToPlutusInterval
However, as we don’t have Semiring classes, the interval upper bounds are always closed
source§impl<T: Ord> Ord for Interval<T>
impl<T: Ord> Ord for Interval<T>
1.21.0 · 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<T: PartialEq> PartialEq for Interval<T>
impl<T: PartialEq> PartialEq for Interval<T>
source§impl<T: PartialOrd> PartialOrd for Interval<T>
impl<T: PartialOrd> PartialOrd for Interval<T>
1.0.0 · source§fn 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 moreimpl<T: Eq> Eq for Interval<T>
impl<T> StructuralPartialEq for Interval<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Interval<T>where
T: RefUnwindSafe,
impl<T> Send for Interval<T>where
T: Send,
impl<T> Sync for Interval<T>where
T: Sync,
impl<T> Unpin for Interval<T>where
T: Unpin,
impl<T> UnwindSafe for Interval<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