pub struct CreateRedPacketInput {
pub chain: CreateRedPacketInputChain,
pub claim_authority: Option<String>,
pub creator: CreateRedPacketInputCreator,
pub fixed_amount: Option<String>,
pub max_claims: NonZeroU64,
pub memo: Option<String>,
pub mint: String,
pub password: Option<String>,
pub total_amount: Option<String>,
}Expand description
CreateRedPacketInput
JSON schema
{
"type": "object",
"required": [
"chain",
"creator",
"maxClaims",
"mint"
],
"properties": {
"chain": {
"description": "DTO.RED_PACKET.CHAIN",
"examples": [
"sol"
],
"type": "string",
"enum": [
"sol",
"bsc",
"eth"
]
},
"claimAuthority": {
"description": "DTO.RED_PACKET.CLAIM_AUTHORITY",
"examples": [
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
],
"type": "string"
},
"creator": {
"description": "DTO.RED_PACKET.CREATOR",
"examples": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
],
"type": "string",
"maxLength": 64,
"minLength": 8
},
"fixedAmount": {
"description": "DTO.RED_PACKET.FIXED_AMOUNT",
"examples": [
"1000000000"
],
"type": "string"
},
"maxClaims": {
"description": "DTO.RED_PACKET.MAX_CLAIMS",
"examples": [
10
],
"type": "integer",
"format": "int64",
"maximum": 100.0,
"minimum": 1.0
},
"memo": {
"description": "DTO.RED_PACKET.MEMO",
"examples": [
"Happy Red Packet"
],
"type": "string"
},
"mint": {
"description": "DTO.RED_PACKET.MINT",
"examples": [
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
],
"type": "string"
},
"password": {
"description": "DTO.RED_PACKET.PASSWORD",
"examples": [
"123456"
],
"type": "string"
},
"totalAmount": {
"description": "DTO.RED_PACKET.TOTAL_AMOUNT",
"examples": [
"1000000000"
],
"type": "string"
}
}
}Fields§
§chain: CreateRedPacketInputChainDTO.RED_PACKET.CHAIN
DTO.RED_PACKET.CLAIM_AUTHORITY
creator: CreateRedPacketInputCreatorDTO.RED_PACKET.CREATOR
fixed_amount: Option<String>DTO.RED_PACKET.FIXED_AMOUNT
max_claims: NonZeroU64DTO.RED_PACKET.MAX_CLAIMS
memo: Option<String>DTO.RED_PACKET.MEMO
mint: StringDTO.RED_PACKET.MINT
password: Option<String>DTO.RED_PACKET.PASSWORD
total_amount: Option<String>DTO.RED_PACKET.TOTAL_AMOUNT
Implementations§
Source§impl CreateRedPacketInput
impl CreateRedPacketInput
pub fn builder() -> CreateRedPacketInput
Trait Implementations§
Source§impl Clone for CreateRedPacketInput
impl Clone for CreateRedPacketInput
Source§fn clone(&self) -> CreateRedPacketInput
fn clone(&self) -> CreateRedPacketInput
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 CreateRedPacketInput
impl Debug for CreateRedPacketInput
Source§impl<'de> Deserialize<'de> for CreateRedPacketInput
impl<'de> Deserialize<'de> for CreateRedPacketInput
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 From<&CreateRedPacketInput> for CreateRedPacketInput
impl From<&CreateRedPacketInput> for CreateRedPacketInput
Source§fn from(value: &CreateRedPacketInput) -> Self
fn from(value: &CreateRedPacketInput) -> Self
Converts to this type from the input type.
Source§impl From<CreateRedPacketInput> for CreateRedPacketInput
impl From<CreateRedPacketInput> for CreateRedPacketInput
Source§fn from(value: CreateRedPacketInput) -> Self
fn from(value: CreateRedPacketInput) -> Self
Converts to this type from the input type.
Source§impl Serialize for CreateRedPacketInput
impl Serialize for CreateRedPacketInput
Source§impl TryFrom<CreateRedPacketInput> for CreateRedPacketInput
impl TryFrom<CreateRedPacketInput> for CreateRedPacketInput
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: CreateRedPacketInput) -> Result<Self, ConversionError>
fn try_from(value: CreateRedPacketInput) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for CreateRedPacketInput
impl RefUnwindSafe for CreateRedPacketInput
impl Send for CreateRedPacketInput
impl Sync for CreateRedPacketInput
impl Unpin for CreateRedPacketInput
impl UnwindSafe for CreateRedPacketInput
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