pub struct SolDataCriterion {
pub conditions: Vec<SolDataCondition>,
pub idls: Vec<SolDataCriterionIdlsItem>,
pub type_: SolDataCriterionType,
}
Expand description
A schema for specifying criterion for instruction data in a Solana transaction.
JSON schema
{
"description": "A schema for specifying criterion for instruction data in a Solana transaction.",
"type": "object",
"required": [
"conditions",
"idls",
"type"
],
"properties": {
"conditions": {
"description": "A list of conditions to apply against the transaction instruction. Only one condition must evaluate to true for this criterion to be met.",
"examples": [
[
{
"instruction": "transfer_checked",
"params": [
{
"name": "lamports",
"operator": "<=",
"value": "1000000"
},
{
"name": "space",
"operator": "==",
"value": "64"
}
]
}
]
],
"type": "array",
"items": {
"$ref": "#/components/schemas/SolDataCondition"
}
},
"idls": {
"description": "List of IDL specifications. Can contain known program names (strings) or custom IDL objects.",
"examples": [
[
"SystemProgram",
"TokenProgram",
{
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"instructions": [
{
"args": [
{
"name": "amount",
"type": "u64"
},
{
"name": "decimals",
"type": "u8"
}
],
"discriminator": [
119,
250,
202,
24,
253,
135,
244,
121
],
"name": "transfer_checked"
}
]
}
]
],
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/KnownIdlType"
},
{
"$ref": "#/components/schemas/Idl"
}
]
}
},
"type": {
"description": "The type of criterion to use. This should be `solData`.",
"examples": [
"solData"
],
"type": "string",
"enum": [
"solData"
]
}
},
"x-audience": "public"
}
Fields§
§conditions: Vec<SolDataCondition>
A list of conditions to apply against the transaction instruction. Only one condition must evaluate to true for this criterion to be met.
idls: Vec<SolDataCriterionIdlsItem>
List of IDL specifications. Can contain known program names (strings) or custom IDL objects.
type_: SolDataCriterionType
The type of criterion to use. This should be solData
.
Implementations§
Source§impl SolDataCriterion
impl SolDataCriterion
pub fn builder() -> SolDataCriterion
Trait Implementations§
Source§impl Clone for SolDataCriterion
impl Clone for SolDataCriterion
Source§fn clone(&self) -> SolDataCriterion
fn clone(&self) -> SolDataCriterion
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 SolDataCriterion
impl Debug for SolDataCriterion
Source§impl<'de> Deserialize<'de> for SolDataCriterion
impl<'de> Deserialize<'de> for SolDataCriterion
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<&SolDataCriterion> for SolDataCriterion
impl From<&SolDataCriterion> for SolDataCriterion
Source§fn from(value: &SolDataCriterion) -> Self
fn from(value: &SolDataCriterion) -> Self
Converts to this type from the input type.
Source§impl From<SolDataCriterion> for SendSolTransactionCriteriaItem
impl From<SolDataCriterion> for SendSolTransactionCriteriaItem
Source§fn from(value: SolDataCriterion) -> Self
fn from(value: SolDataCriterion) -> Self
Converts to this type from the input type.
Source§impl From<SolDataCriterion> for SignSolTransactionCriteriaItem
impl From<SolDataCriterion> for SignSolTransactionCriteriaItem
Source§fn from(value: SolDataCriterion) -> Self
fn from(value: SolDataCriterion) -> Self
Converts to this type from the input type.
Source§impl From<SolDataCriterion> for SolDataCriterion
impl From<SolDataCriterion> for SolDataCriterion
Source§fn from(value: SolDataCriterion) -> Self
fn from(value: SolDataCriterion) -> Self
Converts to this type from the input type.
Source§impl Serialize for SolDataCriterion
impl Serialize for SolDataCriterion
Source§impl TryFrom<SolDataCriterion> for SolDataCriterion
impl TryFrom<SolDataCriterion> for SolDataCriterion
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: SolDataCriterion) -> Result<Self, ConversionError>
fn try_from(value: SolDataCriterion) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SolDataCriterion
impl RefUnwindSafe for SolDataCriterion
impl Send for SolDataCriterion
impl Sync for SolDataCriterion
impl Unpin for SolDataCriterion
impl UnwindSafe for SolDataCriterion
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