pub struct InjectionResult {
pub success: bool,
pub description: String,
pub monetary_impact: Option<Decimal>,
pub related_entities: Vec<String>,
pub metadata: Vec<(String, String)>,
}Expand description
Result of an injection attempt.
Fields§
§success: boolWhether the injection was successful.
description: StringDescription of what was modified.
monetary_impact: Option<Decimal>Monetary impact of the anomaly.
Related entity IDs.
metadata: Vec<(String, String)>Additional metadata.
Implementations§
Source§impl InjectionResult
impl InjectionResult
Sourcepub fn with_impact(self, impact: Decimal) -> Self
pub fn with_impact(self, impact: Decimal) -> Self
Adds monetary impact.
Sourcepub fn with_entity(self, entity: &str) -> Self
pub fn with_entity(self, entity: &str) -> Self
Adds a related entity.
Sourcepub fn with_metadata(self, key: &str, value: &str) -> Self
pub fn with_metadata(self, key: &str, value: &str) -> Self
Adds metadata.
Trait Implementations§
Source§impl Clone for InjectionResult
impl Clone for InjectionResult
Source§fn clone(&self) -> InjectionResult
fn clone(&self) -> InjectionResult
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 moreAuto Trait Implementations§
impl Freeze for InjectionResult
impl RefUnwindSafe for InjectionResult
impl Send for InjectionResult
impl Sync for InjectionResult
impl Unpin for InjectionResult
impl UnwindSafe for InjectionResult
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