pub struct SolDataCondition {
pub instruction: String,
pub params: Vec<SolDataConditionParamsItem>,
}
Expand description
A single condition to apply against a specific instruction type and its parameters.
JSON schema
{
"description": "A single condition to apply against a specific instruction type and its parameters.",
"type": "object",
"required": [
"instruction"
],
"properties": {
"instruction": {
"description": "The instruction name.",
"examples": [
"transfer_checked"
],
"type": "string"
},
"params": {
"description": "Parameter conditions for the instruction.",
"examples": [
[
{
"name": "amount",
"operator": "<=",
"value": "1000000"
},
{
"name": "decimals",
"operator": "==",
"value": "6"
},
{
"name": "owner",
"operator": "in",
"values": [
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"So11111111111111111111111111111111111111112"
]
}
]
],
"type": "array",
"items": {
"description": "A list of parameter conditions to apply against a specific instruction's data.",
"oneOf": [
{
"$ref": "#/components/schemas/SolDataParameterCondition"
},
{
"$ref": "#/components/schemas/SolDataParameterConditionList"
}
]
}
}
},
"x-audience": "public"
}
Fields§
§instruction: String
The instruction name.
params: Vec<SolDataConditionParamsItem>
Parameter conditions for the instruction.
Implementations§
Source§impl SolDataCondition
impl SolDataCondition
pub fn builder() -> SolDataCondition
Trait Implementations§
Source§impl Clone for SolDataCondition
impl Clone for SolDataCondition
Source§fn clone(&self) -> SolDataCondition
fn clone(&self) -> SolDataCondition
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 SolDataCondition
impl Debug for SolDataCondition
Source§impl<'de> Deserialize<'de> for SolDataCondition
impl<'de> Deserialize<'de> for SolDataCondition
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<&SolDataCondition> for SolDataCondition
impl From<&SolDataCondition> for SolDataCondition
Source§fn from(value: &SolDataCondition) -> Self
fn from(value: &SolDataCondition) -> Self
Converts to this type from the input type.
Source§impl From<SolDataCondition> for SolDataCondition
impl From<SolDataCondition> for SolDataCondition
Source§fn from(value: SolDataCondition) -> Self
fn from(value: SolDataCondition) -> Self
Converts to this type from the input type.
Source§impl Serialize for SolDataCondition
impl Serialize for SolDataCondition
Source§impl TryFrom<SolDataCondition> for SolDataCondition
impl TryFrom<SolDataCondition> for SolDataCondition
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: SolDataCondition) -> Result<Self, ConversionError>
fn try_from(value: SolDataCondition) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SolDataCondition
impl RefUnwindSafe for SolDataCondition
impl Send for SolDataCondition
impl Sync for SolDataCondition
impl Unpin for SolDataCondition
impl UnwindSafe for SolDataCondition
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