pub struct PolicyRuleResponse {
pub action: PolicyAction,
pub conditions: Vec<PolicyCondition>,
pub id: String,
pub method: PolicyMethod,
pub name: PolicyRuleResponseName,
}Expand description
A rule that defines the conditions and action to take if the conditions are true.
JSON schema
{
"title": "PolicyRuleResponse",
"description": "A rule that defines the conditions and action to take
if the conditions are true.",
"examples": [
{
"action": "ALLOW",
"conditions": [
{
"field": "to",
"field_source": "ethereum_transaction",
"operator": "eq",
"value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
],
"id": "rule_123",
"method": "eth_sendTransaction",
"name": "Allowlist USDC contract on Base"
}
],
"allOf": [
{
"$ref": "#/components/schemas/PolicyRuleRequestBody"
},
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
}
]
}Fields§
§action: PolicyAction§conditions: Vec<PolicyCondition>§id: String§method: PolicyMethod§name: PolicyRuleResponseNameTrait Implementations§
Source§impl Clone for PolicyRuleResponse
impl Clone for PolicyRuleResponse
Source§fn clone(&self) -> PolicyRuleResponse
fn clone(&self) -> PolicyRuleResponse
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 PolicyRuleResponse
impl Debug for PolicyRuleResponse
Source§impl<'de> Deserialize<'de> for PolicyRuleResponse
impl<'de> Deserialize<'de> for PolicyRuleResponse
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<&PolicyRuleResponse> for PolicyRuleResponse
impl From<&PolicyRuleResponse> for PolicyRuleResponse
Source§fn from(value: &PolicyRuleResponse) -> Self
fn from(value: &PolicyRuleResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PolicyRuleResponse
impl RefUnwindSafe for PolicyRuleResponse
impl Send for PolicyRuleResponse
impl Sync for PolicyRuleResponse
impl Unpin for PolicyRuleResponse
impl UnwindSafe for PolicyRuleResponse
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