Field

Enum Field 

Source
#[non_exhaustive]
pub enum Field { Null, Text(Text), Ip(Ip), Domain(String), User(String), AssetID(String), U64(u64), I64(i64), F64(f64), Date(Filetime), Array(Vec<Text>), Path(PathBuf), }

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Null

§

Text(Text)

A basic String field

§

Ip(Ip)

IPv4 or IPv6

§

Domain(String)

§

User(String)

§

AssetID(String)

This is a special field. Uniquely identifies an asset like a system, a computer or a mobile phone. Reason: the network is dynamic, the IP address is not fixed certain devices and the hostname of a system can be changed.

This field should be used with a dataset to recover information about an asset during the enchance phase: Getting the IP address, the users logged in the system or another information.

Can be multiple AssetsID associated with the same event because multiple virtual machines can be running in the same asset.

§

U64(u64)

unsigned number with 64 bits

§

I64(i64)

signed number with 64 bits

§

F64(f64)

decimal number with 64 bits

§

Date(Filetime)

A date in a decimal number format with 64 bits

§

Array(Vec<Text>)

§

Path(PathBuf)

Trait Implementations§

Source§

impl Clone for Field

Source§

fn clone(&self) -> Field

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Field

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Field

Source§

fn default() -> Field

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Field

Source§

fn deserialize<D>(deserializer: D) -> Result<Field, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&Cow<'static, str>> for Field

Source§

fn from(v: &Text) -> Field

Converts to this type from the input type.
Source§

impl From<&Ip> for Field

Source§

fn from(v: &Ip) -> Field

Converts to this type from the input type.
Source§

impl From<&String> for Field

Source§

fn from(v: &String) -> Field

Converts to this type from the input type.
Source§

impl From<&Vec<Cow<'static, str>>> for Field

Source§

fn from(v: &Vec<Text>) -> Field

Converts to this type from the input type.
Source§

impl From<&f64> for Field

Source§

fn from(v: &f64) -> Field

Converts to this type from the input type.
Source§

impl From<&i64> for Field

Source§

fn from(v: &i64) -> Field

Converts to this type from the input type.
Source§

impl From<&'static str> for Field

Source§

fn from(v: &'static str) -> Field

Converts to this type from the input type.
Source§

impl From<&u32> for Field

Source§

fn from(v: &u32) -> Field

Converts to this type from the input type.
Source§

impl From<&u64> for Field

Source§

fn from(v: &u64) -> Field

Converts to this type from the input type.
Source§

impl From<Cow<'static, str>> for Field

Source§

fn from(v: Text) -> Field

Converts to this type from the input type.
Source§

impl From<Ip> for Field

Source§

fn from(v: Ip) -> Field

Converts to this type from the input type.
Source§

impl From<String> for Field

Source§

fn from(v: String) -> Field

Converts to this type from the input type.
Source§

impl From<Vec<Cow<'static, str>>> for Field

Source§

fn from(v: Vec<Text>) -> Field

Converts to this type from the input type.
Source§

impl From<f64> for Field

Source§

fn from(v: f64) -> Field

Converts to this type from the input type.
Source§

impl From<i64> for Field

Source§

fn from(v: i64) -> Field

Converts to this type from the input type.
Source§

impl From<u32> for Field

Source§

fn from(v: u32) -> Field

Converts to this type from the input type.
Source§

impl From<u64> for Field

Source§

fn from(v: u64) -> Field

Converts to this type from the input type.
Source§

impl Serialize for Field

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'a> TryFrom<&'a Field> for &'a Ip

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: &Field) -> Result<&Ip, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Field> for Ip

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: Field) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<&'a Cow<'static, str>> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a Text, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<&'a Vec<Cow<'static, str>>> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a Vec<Text>, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<&'a str> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<&'a str, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<Cow<'static, str>> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Text, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<Ip> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Ip, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<Vec<Cow<'static, str>>> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Vec<Text>, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<f64> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<f64, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<i64> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<i64, Self::Error>

Performs the conversion.
Source§

impl<'a> TryInto<u64> for &'a Field

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<u64, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for Field

§

impl RefUnwindSafe for Field

§

impl Send for Field

§

impl Sync for Field

§

impl Unpin for Field

§

impl UnwindSafe for Field

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,