Enum plutus_ledger_api::v1::interval::Interval
source · pub enum Interval<T> {
Finite(T, T),
StartAt(T),
StartAfter(T),
EndAt(T),
EndBefore(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,
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 moresource§impl<T> TryFrom<PlutusInterval<T>> for Interval<T>where
T: FeatureTraits + PartialOrd,
impl<T> TryFrom<PlutusInterval<T>> for Interval<T>where
T: FeatureTraits + PartialOrd,
§type Error = TryFromPlutusIntervalError
type Error = TryFromPlutusIntervalError
The type returned in the event of a conversion error.
impl<T: Eq> Eq for Interval<T>
impl<T> StructuralPartialEq for Interval<T>
Auto Trait Implementations§
impl<T> Freeze for Interval<T>where
T: Freeze,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)