pub struct EventLockingConditions {
pub locking_points: Vec<MaybePoint>,
pub expiry: Option<u32>,
}Expand description
The locking points derived from the oracle’s announcement of a future event.
Fields§
§locking_points: Vec<MaybePoint>An array of locking points which represent distinct outcomes. Each locking point should have its discrete log revealed by the oracle when and if that outcome occurs.
expiry: Option<u32>The unix timestamp beyond which the oracle is considered to have gone AWOL.
If set to None, the event has no expected expiry.
Implementations§
Source§impl EventLockingConditions
impl EventLockingConditions
Sourcepub fn is_valid_outcome(&self, outcome: &Outcome) -> bool
pub fn is_valid_outcome(&self, outcome: &Outcome) -> bool
Returns true if the given outcome is a valid outcome to wager on for this event.
Sourcepub fn all_outcomes(&self) -> impl IntoIterator<Item = Outcome>
pub fn all_outcomes(&self) -> impl IntoIterator<Item = Outcome>
Returns an iterator over all possible outcomes in the event.
Trait Implementations§
Source§impl Clone for EventLockingConditions
impl Clone for EventLockingConditions
Source§fn clone(&self) -> EventLockingConditions
fn clone(&self) -> EventLockingConditions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventLockingConditions
impl Debug for EventLockingConditions
Source§impl<'de> Deserialize<'de> for EventLockingConditions
impl<'de> Deserialize<'de> for EventLockingConditions
Source§fn 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
Source§impl PartialEq for EventLockingConditions
impl PartialEq for EventLockingConditions
Source§impl Serialize for EventLockingConditions
impl Serialize for EventLockingConditions
impl Eq for EventLockingConditions
impl StructuralPartialEq for EventLockingConditions
Auto Trait Implementations§
impl Freeze for EventLockingConditions
impl RefUnwindSafe for EventLockingConditions
impl Send for EventLockingConditions
impl Sync for EventLockingConditions
impl Unpin for EventLockingConditions
impl UnwindSafe for EventLockingConditions
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