pub struct EvaluatedUnit {
pub address: Option<EvaluatedUnitAddress>,
pub count: i64,
pub index: u64,
}Expand description
The unit this result describes. Present only when the operation was evaluated as more than one unit: one unit per call for user operations, and one unit per signing account for Solana transactions. Each unit is evaluated against the policies separately, and matchedRule, unmatchedRules, evaluatedPolicies, and every observed value describe this unit only. When action is reject, this is the first unit that was rejected. When action is accept, every unit was accepted and this is the last one.
JSON schema
{
"title": "EvaluatedUnit",
"description": "The unit this result describes. Present only when the operation was evaluated as more than one unit: one unit per call for user operations, and one unit per signing account for Solana transactions. Each unit is evaluated against the policies separately, and `matchedRule`, `unmatchedRules`, `evaluatedPolicies`, and every observed value describe this unit only. When `action` is `reject`, this is the first unit that was rejected. When `action` is `accept`, every unit was accepted and this is the last one.",
"examples": [
{
"count": 3,
"index": 2
}
],
"type": "object",
"required": [
"count",
"index"
],
"properties": {
"address": {
"description": "The Solana signing account of the unit. Omitted for user operations.",
"examples": [
"HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"
],
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
},
"count": {
"description": "The number of units the operation was split into.",
"examples": [
3
],
"type": "integer",
"minimum": 2.0
},
"index": {
"description": "Zero-based index of the unit. For user operations, this is the index into the operation's `calls`.",
"examples": [
2
],
"type": "integer",
"minimum": 0.0
}
},
"additionalProperties": false
}Fields§
§address: Option<EvaluatedUnitAddress>The Solana signing account of the unit. Omitted for user operations.
count: i64The number of units the operation was split into.
index: u64Zero-based index of the unit. For user operations, this is the index into the operation’s calls.
Implementations§
Source§impl EvaluatedUnit
impl EvaluatedUnit
pub fn builder() -> EvaluatedUnit
Trait Implementations§
Source§impl Clone for EvaluatedUnit
impl Clone for EvaluatedUnit
Source§impl Debug for EvaluatedUnit
impl Debug for EvaluatedUnit
Source§impl<'de> Deserialize<'de> for EvaluatedUnit
impl<'de> Deserialize<'de> for EvaluatedUnit
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<&EvaluatedUnit> for EvaluatedUnit
impl From<&EvaluatedUnit> for EvaluatedUnit
Source§fn from(value: &EvaluatedUnit) -> Self
fn from(value: &EvaluatedUnit) -> Self
Converts to this type from the input type.
Source§impl From<EvaluatedUnit> for EvaluatedUnit
impl From<EvaluatedUnit> for EvaluatedUnit
Source§fn from(value: EvaluatedUnit) -> Self
fn from(value: EvaluatedUnit) -> Self
Converts to this type from the input type.
Source§impl Serialize for EvaluatedUnit
impl Serialize for EvaluatedUnit
Source§impl TryFrom<EvaluatedUnit> for EvaluatedUnit
impl TryFrom<EvaluatedUnit> for EvaluatedUnit
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: EvaluatedUnit) -> Result<Self, ConversionError>
fn try_from(value: EvaluatedUnit) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for EvaluatedUnit
impl RefUnwindSafe for EvaluatedUnit
impl Send for EvaluatedUnit
impl Sync for EvaluatedUnit
impl Unpin for EvaluatedUnit
impl UnsafeUnpin for EvaluatedUnit
impl UnwindSafe for EvaluatedUnit
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