pub struct LotterySession {Show 16 fields
pub session_id: String,
pub title: String,
pub description: String,
pub participants: Vec<String>,
pub nft_contract: Option<String>,
pub creator: String,
pub status: LotteryStatus,
pub created_at: Timestamp,
pub created_height: u64,
pub time_control: TimeControlMode,
pub commitment_deadline: Option<Timestamp>,
pub reveal_deadline: Option<Timestamp>,
pub commitment_deadline_height: Option<u64>,
pub reveal_deadline_height: Option<u64>,
pub reward: VotingReward,
pub result: Option<LotteryResult>,
}Expand description
抽奖会话
Fields§
§session_id: String会话ID
title: String会话标题
description: String会话描述
participants: Vec<String>参与者地址列表
nft_contract: Option<String>关联的NFT合约地址
creator: String创建者地址
status: LotteryStatus会话状态
created_at: Timestamp创建时间
created_height: u64创建时的区块高度
time_control: TimeControlMode时间控制模式
commitment_deadline: Option<Timestamp>承诺阶段截止时间
reveal_deadline: Option<Timestamp>揭示阶段截止时间
commitment_deadline_height: Option<u64>承诺阶段截止区块高度
reveal_deadline_height: Option<u64>揭示阶段截止区块高度
reward: VotingReward奖品信息
result: Option<LotteryResult>抽奖结果
Trait Implementations§
Source§impl Clone for LotterySession
impl Clone for LotterySession
Source§fn clone(&self) -> LotterySession
fn clone(&self) -> LotterySession
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 LotterySession
impl Debug for LotterySession
Source§impl<'de> Deserialize<'de> for LotterySession
impl<'de> Deserialize<'de> for LotterySession
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 JsonSchema for LotterySession
impl JsonSchema for LotterySession
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for LotterySession
impl PartialEq for LotterySession
Source§impl Serialize for LotterySession
impl Serialize for LotterySession
impl StructuralPartialEq for LotterySession
Auto Trait Implementations§
impl Freeze for LotterySession
impl RefUnwindSafe for LotterySession
impl Send for LotterySession
impl Sync for LotterySession
impl Unpin for LotterySession
impl UnwindSafe for LotterySession
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more