pub struct SolDataParameterCondition {
pub name: String,
pub operator: SolDataParameterConditionOperator,
pub value: String,
}
Expand description
A single parameter condition to apply against a specific instruction’s parameters.
JSON schema
{
"title": "SolDataParameterCondition",
"description": "A single parameter condition to apply against a specific instruction's parameters.",
"type": "object",
"required": [
"name",
"operator",
"value"
],
"properties": {
"name": {
"description": "The parameter name.",
"examples": [
"amount"
],
"type": "string"
},
"operator": {
"description": "The operator to use for the comparison. The value resolved at the `name` will be on the left-hand side of the operator, and the `value` field will be on the right-hand side.",
"examples": [
"=="
],
"type": "string",
"enum": [
"GreaterThan",
"GreaterThanOrEqual",
"LessThan",
"LessThanOrEqual",
"Equal"
]
},
"value": {
"description": "The value to compare against.",
"examples": [
"1000000"
],
"type": "string"
}
},
"x-audience": "public"
}
Fields§
§name: String
The parameter name.
operator: SolDataParameterConditionOperator
The operator to use for the comparison. The value resolved at the name
will be on the left-hand side of the operator, and the value
field will be on the right-hand side.
value: String
The value to compare against.
Implementations§
Source§impl SolDataParameterCondition
impl SolDataParameterCondition
pub fn builder() -> SolDataParameterCondition
Trait Implementations§
Source§impl Clone for SolDataParameterCondition
impl Clone for SolDataParameterCondition
Source§fn clone(&self) -> SolDataParameterCondition
fn clone(&self) -> SolDataParameterCondition
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 SolDataParameterCondition
impl Debug for SolDataParameterCondition
Source§impl<'de> Deserialize<'de> for SolDataParameterCondition
impl<'de> Deserialize<'de> for SolDataParameterCondition
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<&SolDataParameterCondition> for SolDataParameterCondition
impl From<&SolDataParameterCondition> for SolDataParameterCondition
Source§fn from(value: &SolDataParameterCondition) -> Self
fn from(value: &SolDataParameterCondition) -> Self
Converts to this type from the input type.
Source§impl From<SolDataParameterCondition> for SolDataConditionParamsItem
impl From<SolDataParameterCondition> for SolDataConditionParamsItem
Source§fn from(value: SolDataParameterCondition) -> Self
fn from(value: SolDataParameterCondition) -> Self
Converts to this type from the input type.
Source§impl From<SolDataParameterCondition> for SolDataParameterCondition
impl From<SolDataParameterCondition> for SolDataParameterCondition
Source§fn from(value: SolDataParameterCondition) -> Self
fn from(value: SolDataParameterCondition) -> Self
Converts to this type from the input type.
Source§impl TryFrom<SolDataParameterCondition> for SolDataParameterCondition
impl TryFrom<SolDataParameterCondition> for SolDataParameterCondition
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: SolDataParameterCondition) -> Result<Self, ConversionError>
fn try_from(value: SolDataParameterCondition) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SolDataParameterCondition
impl RefUnwindSafe for SolDataParameterCondition
impl Send for SolDataParameterCondition
impl Sync for SolDataParameterCondition
impl Unpin for SolDataParameterCondition
impl UnwindSafe for SolDataParameterCondition
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