pub struct PolicyResult {
pub policy_id: String,
pub status: PolicyStatus,
pub severity: Severity,
pub actual: Option<f64>,
pub expected: Option<f64>,
pub message: String,
pub remediation: Option<String>,
}Expand description
The result of evaluating one policy clause.
Fields§
§policy_id: StringStable identifier of the clause, e.g. "absolute_max_cu".
status: PolicyStatusPass/warn/fail outcome.
severity: SeveritySeverity classification.
actual: Option<f64>The measured value, if numeric.
expected: Option<f64>The threshold compared against, if numeric.
message: StringHuman-readable explanation.
remediation: Option<String>Optional Solana-specific remediation hint.
Implementations§
Trait Implementations§
Source§impl Clone for PolicyResult
impl Clone for PolicyResult
Source§fn clone(&self) -> PolicyResult
fn clone(&self) -> PolicyResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PolicyResult
impl Debug for PolicyResult
Source§impl<'de> Deserialize<'de> for PolicyResult
impl<'de> Deserialize<'de> for PolicyResult
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 PartialEq for PolicyResult
impl PartialEq for PolicyResult
Source§fn eq(&self, other: &PolicyResult) -> bool
fn eq(&self, other: &PolicyResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PolicyResult
impl Serialize for PolicyResult
impl StructuralPartialEq for PolicyResult
Auto Trait Implementations§
impl Freeze for PolicyResult
impl RefUnwindSafe for PolicyResult
impl Send for PolicyResult
impl Sync for PolicyResult
impl Unpin for PolicyResult
impl UnsafeUnpin for PolicyResult
impl UnwindSafe for PolicyResult
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