pub struct EvmTypedNumericalCondition {
pub operator: EvmTypedNumericalConditionOperator,
pub path: String,
pub value: EvmTypedNumericalConditionValue,
}
Expand description
A schema for specifying criterion for a numerical field of an EVM typed message. The value can be deeply nested within the typed data’s message.
JSON schema
{
"title": "EvmTypedNumericalCondition",
"description": "A schema for specifying criterion for a numerical field of an EVM typed message. The value can be deeply nested within the typed data's message.",
"type": "object",
"required": [
"operator",
"path",
"value"
],
"properties": {
"operator": {
"description": "The operator to use for the comparison. The value located at the message's path 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"
]
},
"path": {
"description": "The path to the field to compare against this criterion. To reference deeply nested fields within the message, separate object keys by `.`, and access array values using `[index]`. If the field does not exist or is not an address, the operation will be rejected.",
"examples": [
"targets[0].amount"
],
"type": "string"
},
"value": {
"description": "The amount that the value located at the message's path should be compared to.",
"examples": [
"1000000000000000000"
],
"type": "string",
"pattern": "^[0-9]+$"
}
},
"x-audience": "public"
}
Fields§
§operator: EvmTypedNumericalConditionOperator
The operator to use for the comparison. The value located at the message’s path will be on the left-hand side of the operator, and the value
field will be on the right-hand side.
path: String
The path to the field to compare against this criterion. To reference deeply nested fields within the message, separate object keys by .
, and access array values using [index]
. If the field does not exist or is not an address, the operation will be rejected.
value: EvmTypedNumericalConditionValue
The amount that the value located at the message’s path should be compared to.
Implementations§
Source§impl EvmTypedNumericalCondition
impl EvmTypedNumericalCondition
pub fn builder() -> EvmTypedNumericalCondition
Trait Implementations§
Source§impl Clone for EvmTypedNumericalCondition
impl Clone for EvmTypedNumericalCondition
Source§fn clone(&self) -> EvmTypedNumericalCondition
fn clone(&self) -> EvmTypedNumericalCondition
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 EvmTypedNumericalCondition
impl Debug for EvmTypedNumericalCondition
Source§impl<'de> Deserialize<'de> for EvmTypedNumericalCondition
impl<'de> Deserialize<'de> for EvmTypedNumericalCondition
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<&EvmTypedNumericalCondition> for EvmTypedNumericalCondition
impl From<&EvmTypedNumericalCondition> for EvmTypedNumericalCondition
Source§fn from(value: &EvmTypedNumericalCondition) -> Self
fn from(value: &EvmTypedNumericalCondition) -> Self
Converts to this type from the input type.
Source§impl From<EvmTypedNumericalCondition> for EvmTypedNumericalCondition
impl From<EvmTypedNumericalCondition> for EvmTypedNumericalCondition
Source§fn from(value: EvmTypedNumericalCondition) -> Self
fn from(value: EvmTypedNumericalCondition) -> Self
Converts to this type from the input type.
Source§impl From<EvmTypedNumericalCondition> for SignEvmTypedDataFieldCriterionConditionsItem
impl From<EvmTypedNumericalCondition> for SignEvmTypedDataFieldCriterionConditionsItem
Source§fn from(value: EvmTypedNumericalCondition) -> Self
fn from(value: EvmTypedNumericalCondition) -> Self
Converts to this type from the input type.
Source§impl TryFrom<EvmTypedNumericalCondition> for EvmTypedNumericalCondition
impl TryFrom<EvmTypedNumericalCondition> for EvmTypedNumericalCondition
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: EvmTypedNumericalCondition) -> Result<Self, ConversionError>
fn try_from(value: EvmTypedNumericalCondition) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for EvmTypedNumericalCondition
impl RefUnwindSafe for EvmTypedNumericalCondition
impl Send for EvmTypedNumericalCondition
impl Sync for EvmTypedNumericalCondition
impl Unpin for EvmTypedNumericalCondition
impl UnwindSafe for EvmTypedNumericalCondition
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