Struct forensic_rs::data::ForensicData
source · pub struct ForensicData { /* private fields */ }Expand description
Basic container for all Forensic Data inside an artifact
Implementations§
source§impl<'a> ForensicData
impl<'a> ForensicData
pub fn new(host: &str, artifact: Artifact) -> Self
pub fn artifact(&self) -> &Artifact
pub fn host(&'a self) -> &'a str
pub fn field(&self, field_name: &str) -> Option<&Field>
pub fn has_field(&self, field_name: &str) -> bool
pub fn field_mut(&'a mut self, field_name: &str) -> Option<&mut Field>
pub fn add_field(&mut self, field_name: &str, field_value: Field)
pub fn insert(&mut self, field_name: Text, field_value: Field)
sourcepub fn i64_field(&'a mut self, field_name: &str) -> Option<i64>
pub fn i64_field(&'a mut self, field_name: &str) -> Option<i64>
Obtains the casted value of the field into i64 and caches it
sourcepub fn f64_field(&'a mut self, field_name: &str) -> Option<f64>
pub fn f64_field(&'a mut self, field_name: &str) -> Option<f64>
Obtains the casted value of the field into f64 and caches it
sourcepub fn u64_field(&'a mut self, field_name: &str) -> Option<u64>
pub fn u64_field(&'a mut self, field_name: &str) -> Option<u64>
Obtains the casted value of the field into u64 and caches it
sourcepub fn ip_field(&'a mut self, field_name: &str) -> Option<Ip>
pub fn ip_field(&'a mut self, field_name: &str) -> Option<Ip>
Obtains the casted value of the field into IP and caches it
sourcepub fn txt_field(&'a mut self, field_name: &str) -> Option<&Text>
pub fn txt_field(&'a mut self, field_name: &str) -> Option<&Text>
Obtains the casted value of the field into Text and caches it
sourcepub fn array_field(&'a mut self, field_name: &str) -> Option<&Vec<Text>>
pub fn array_field(&'a mut self, field_name: &str) -> Option<&Vec<Text>>
Obtains the casted value of the field into Vec
pub fn fields(&self) -> EventIter<'_> ⓘ
pub fn iter(&self) -> EventIter<'_> ⓘ
pub fn iter_mut(&mut self) -> EventIterMut<'_> ⓘ
Trait Implementations§
source§impl Clone for ForensicData
impl Clone for ForensicData
source§fn clone(&self) -> ForensicData
fn clone(&self) -> ForensicData
Returns a copy 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 ForensicData
impl Debug for ForensicData
source§impl Default for ForensicData
impl Default for ForensicData
source§impl<'de> Deserialize<'de> for ForensicData
impl<'de> Deserialize<'de> for ForensicData
source§fn deserialize<D>(deserializer: D) -> Result<ForensicData, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<ForensicData, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ForensicData
impl Display for ForensicData
Auto Trait Implementations§
impl RefUnwindSafe for ForensicData
impl Send for ForensicData
impl Sync for ForensicData
impl Unpin for ForensicData
impl UnwindSafe for ForensicData
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