pub enum ContractInfo {
SingleContractInfo(SingleContractInfo),
DisjointContractInfo(DisjointContractInfo),
}Expand description
Contains information about the contract outcomes, payouts and oracles.
Variants§
SingleContractInfo(SingleContractInfo)
A contract that is based on a single event.
DisjointContractInfo(DisjointContractInfo)
A contract that is based on multiple events.
Implementations§
Source§impl ContractInfo
impl ContractInfo
Sourcepub fn get_total_collateral(&self) -> Amount
pub fn get_total_collateral(&self) -> Amount
Returns the total collateral locked inside the contract.
Sourcepub fn get_closest_maturity_date(&self) -> u32
pub fn get_closest_maturity_date(&self) -> u32
Return the smallet maturity date amongst all events and oracle announcements used in the contract.
Trait Implementations§
Source§impl Clone for ContractInfo
impl Clone for ContractInfo
Source§fn clone(&self) -> ContractInfo
fn clone(&self) -> ContractInfo
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 ContractInfo
impl Debug for ContractInfo
Source§impl PartialEq for ContractInfo
impl PartialEq for ContractInfo
Source§impl Readable for ContractInfo
impl Readable for ContractInfo
Source§impl Writeable for ContractInfo
impl Writeable for ContractInfo
impl StructuralPartialEq for ContractInfo
Auto Trait Implementations§
impl Freeze for ContractInfo
impl RefUnwindSafe for ContractInfo
impl Send for ContractInfo
impl Sync for ContractInfo
impl Unpin for ContractInfo
impl UnwindSafe for ContractInfo
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