Enum Indicator

Source
pub enum Indicator {
Show 16 variants Url(String), Domain(String), File(String), Email(String), Ipv4(Ipv4Addr), Ipv6(Ipv6Addr), Sha512(String), Sha256(String), Sha1(String), Md5(String), BitcoinP2pkhAddress(String), BitcoinP2shAddress(String), BitcoinP2wpkhAddress(String), BitcoinP2wshAddress(String), LitecoinP2pkhAddress(String), LitecoinP2wpkhAddress(String),
}
Expand description

Data representing a single indicator with a kind and a value.

If the value contained defanged data, the fangs will be removed. Meaning that https[:]//github(.)com will be represented as Url("https://github.com").

Variants§

§

Url(String)

An URL starting with http or https

§

Domain(String)

A domain name with a valid TLD (e.g., github.com) with validation using tldextract

§

File(String)

A filename with very basic validation (e.g. if it has a .), but no extension validation. It’s not guaranteed to be a valid filename and is mostly a catch-all if it wasn’t able to match any other indicator.

§

Email(String)

An email address, e.g. benoit@jeaurond.dev

§

Ipv4(Ipv4Addr)

An IPv4 address, e.g. 127.0.0.1

§

Ipv6(Ipv6Addr)

An IPv6 address, e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334

§

Sha512(String)

A case-insentive SHA512 hash, e.g. f1d9d8f153ec808a44cd63fb85f7cb811845b1596e46e78febd8c8b505a9b7d3a242c98b2b51261e5402f37334beefd7ba4066873a6dc56cd030cf29f4aef6dc

§

Sha256(String)

A case-insentive SHA256 hash, e.g. e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

§

Sha1(String)

A case-insentive SHA1 hash, e.g. da39a3ee5e6b4b0d3255bfef95601890afd80709

§

Md5(String)

A case-insentive MD5 hash, e.g. d41d8cd98f00b204e9800998ecf8427e

§

BitcoinP2pkhAddress(String)

A Bitcoin P2PKH address, e.g. 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

§

BitcoinP2shAddress(String)

A Bitcoin P2SH address, e.g. 32jmM9eev8E7CGCAWLSHQnqgHBifcHzgQf

§

BitcoinP2wpkhAddress(String)

A Bitcoin P2WPKH address, e.g. bc1p4w46h2at4w46h2at4w46h2at4w46h2at5kreae

§

BitcoinP2wshAddress(String)

A Bitcoin P2WSH address, e.g. bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3

§

LitecoinP2pkhAddress(String)

§

LitecoinP2wpkhAddress(String)

A Litecoin P2WPKH address, e.g. ltc1q8c6fshw2dlwun7ekn9qwf37cu2rn755u9ym7p0

Trait Implementations§

Source§

impl Debug for Indicator

Source§

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

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

impl Ord for Indicator

Source§

fn cmp(&self, other: &Indicator) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Indicator

Source§

fn eq(&self, other: &Indicator) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Indicator

Source§

fn partial_cmp(&self, other: &Indicator) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Indicator

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 Eq for Indicator

Source§

impl StructuralPartialEq for Indicator

Auto Trait Implementations§

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Same for T

Source§

type Output = T

Should always be Self
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> ErasedDestructor for T
where T: 'static,