Skip to main content

StixObjectEnum

Enum StixObjectEnum 

Source
pub enum StixObjectEnum {
Show 45 variants Identity(Identity), Malware(Malware), Indicator(Indicator), ObservedData(ObservedData), MalwareAnalysis(MalwareAnalysis), Sighting(Sighting), Relationship(Relationship), File(File), Incident(Incident), Location(Location), NetworkTraffic(NetworkTraffic), DomainName(DomainName), IPv4Addr(IPv4Addr), Url(Url), Process(Process), Artifact(Artifact), IPv6Addr(IPv6Addr), MacAddr(MacAddr), Software(Software), UserAccount(UserAccount), EmailAddr(EmailAddr), EmailMessage(EmailMessage), SocketAddr(SocketAddr), AutonomousSystem(AutonomousSystem), SoftwarePackage(SoftwarePackage), Directory(Directory), Mutex(Mutex), WindowsRegistryKey(WindowsRegistryKey), X509Certificate(X509Certificate), AttackPattern(AttackPattern), Campaign(Campaign), ThreatActor(ThreatActor), Tool(Tool), Vulnerability(Vulnerability), CourseOfAction(CourseOfAction), IntrusionSet(IntrusionSet), Infrastructure(Infrastructure), Report(Report), Note(Note), Opinion(Opinion), Grouping(Grouping), MarkingDefinition(MarkingDefinition), LanguageContent(LanguageContent), ExtensionDefinition(ExtensionDefinition), Custom(Value),
}
Expand description

A wrapper enum for STIX objects. Deserializes based on the type field.

Variants§

§

Identity(Identity)

§

Malware(Malware)

§

Indicator(Indicator)

§

ObservedData(ObservedData)

§

MalwareAnalysis(MalwareAnalysis)

§

Sighting(Sighting)

§

Relationship(Relationship)

§

File(File)

§

Incident(Incident)

§

Location(Location)

§

NetworkTraffic(NetworkTraffic)

§

DomainName(DomainName)

§

IPv4Addr(IPv4Addr)

§

Url(Url)

§

Process(Process)

§

Artifact(Artifact)

§

IPv6Addr(IPv6Addr)

§

MacAddr(MacAddr)

§

Software(Software)

§

UserAccount(UserAccount)

§

EmailAddr(EmailAddr)

§

EmailMessage(EmailMessage)

§

SocketAddr(SocketAddr)

§

AutonomousSystem(AutonomousSystem)

§

SoftwarePackage(SoftwarePackage)

§

Directory(Directory)

§

Mutex(Mutex)

§

WindowsRegistryKey(WindowsRegistryKey)

§

X509Certificate(X509Certificate)

§

AttackPattern(AttackPattern)

§

Campaign(Campaign)

§

ThreatActor(ThreatActor)

§

Tool(Tool)

§

Vulnerability(Vulnerability)

§

CourseOfAction(CourseOfAction)

§

IntrusionSet(IntrusionSet)

§

Infrastructure(Infrastructure)

§

Report(Report)

§

Note(Note)

§

Opinion(Opinion)

§

Grouping(Grouping)

§

MarkingDefinition(MarkingDefinition)

§

LanguageContent(LanguageContent)

§

ExtensionDefinition(ExtensionDefinition)

§

Custom(Value)

Implementations§

Source§

impl StixObjectEnum

Source

pub fn name(&self) -> Option<&str>

Get the ID of the wrapped object

Source

pub fn created(&self) -> DateTime<Utc>

Source

pub fn labels(&self) -> Option<&Vec<String>>

Source

pub fn id(&self) -> String

Source

pub fn type_(&self) -> &str

Get the type of the wrapped object

Trait Implementations§

Source§

impl Clone for StixObjectEnum

Source§

fn clone(&self) -> StixObjectEnum

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 StixObjectEnum

Source§

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

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

impl<'de> Deserialize<'de> for StixObjectEnum

Source§

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 From<Artifact> for StixObjectEnum

Source§

fn from(a: Artifact) -> Self

Converts to this type from the input type.
Source§

impl From<AttackPattern> for StixObjectEnum

Source§

fn from(a: AttackPattern) -> Self

Converts to this type from the input type.
Source§

impl From<AutonomousSystem> for StixObjectEnum

Source§

fn from(a: AutonomousSystem) -> Self

Converts to this type from the input type.
Source§

impl From<Campaign> for StixObjectEnum

Source§

fn from(c: Campaign) -> Self

Converts to this type from the input type.
Source§

impl From<CourseOfAction> for StixObjectEnum

Source§

fn from(c: CourseOfAction) -> Self

Converts to this type from the input type.
Source§

impl From<Directory> for StixObjectEnum

Source§

fn from(d: Directory) -> Self

Converts to this type from the input type.
Source§

impl From<DomainName> for StixObjectEnum

Source§

fn from(d: DomainName) -> Self

Converts to this type from the input type.
Source§

impl From<EmailAddr> for StixObjectEnum

Source§

fn from(e: EmailAddr) -> Self

Converts to this type from the input type.
Source§

impl From<EmailMessage> for StixObjectEnum

Source§

fn from(e: EmailMessage) -> Self

Converts to this type from the input type.
Source§

impl From<File> for StixObjectEnum

Source§

fn from(f: File) -> Self

Converts to this type from the input type.
Source§

impl From<Grouping> for StixObjectEnum

Source§

fn from(g: Grouping) -> Self

Converts to this type from the input type.
Source§

impl From<IPv4Addr> for StixObjectEnum

Source§

fn from(i: IPv4Addr) -> Self

Converts to this type from the input type.
Source§

impl From<IPv6Addr> for StixObjectEnum

Source§

fn from(i: IPv6Addr) -> Self

Converts to this type from the input type.
Source§

impl From<Identity> for StixObjectEnum

Source§

fn from(i: Identity) -> Self

Converts to this type from the input type.
Source§

impl From<Incident> for StixObjectEnum

Source§

fn from(i: Incident) -> Self

Converts to this type from the input type.
Source§

impl From<Indicator> for StixObjectEnum

Source§

fn from(i: Indicator) -> Self

Converts to this type from the input type.
Source§

impl From<Infrastructure> for StixObjectEnum

Source§

fn from(i: Infrastructure) -> Self

Converts to this type from the input type.
Source§

impl From<IntrusionSet> for StixObjectEnum

Source§

fn from(i: IntrusionSet) -> Self

Converts to this type from the input type.
Source§

impl From<Location> for StixObjectEnum

Source§

fn from(l: Location) -> Self

Converts to this type from the input type.
Source§

impl From<MacAddr> for StixObjectEnum

Source§

fn from(m: MacAddr) -> Self

Converts to this type from the input type.
Source§

impl From<Malware> for StixObjectEnum

Source§

fn from(m: Malware) -> Self

Converts to this type from the input type.
Source§

impl From<MalwareAnalysis> for StixObjectEnum

Source§

fn from(m: MalwareAnalysis) -> Self

Converts to this type from the input type.
Source§

impl From<Mutex> for StixObjectEnum

Source§

fn from(m: Mutex) -> Self

Converts to this type from the input type.
Source§

impl From<NetworkTraffic> for StixObjectEnum

Source§

fn from(n: NetworkTraffic) -> Self

Converts to this type from the input type.
Source§

impl From<Note> for StixObjectEnum

Source§

fn from(n: Note) -> Self

Converts to this type from the input type.
Source§

impl From<ObservedData> for StixObjectEnum

Source§

fn from(o: ObservedData) -> Self

Converts to this type from the input type.
Source§

impl From<Opinion> for StixObjectEnum

Source§

fn from(o: Opinion) -> Self

Converts to this type from the input type.
Source§

impl From<Process> for StixObjectEnum

Source§

fn from(p: Process) -> Self

Converts to this type from the input type.
Source§

impl From<Relationship> for StixObjectEnum

Source§

fn from(r: Relationship) -> Self

Converts to this type from the input type.
Source§

impl From<Report> for StixObjectEnum

Source§

fn from(r: Report) -> Self

Converts to this type from the input type.
Source§

impl From<Sighting> for StixObjectEnum

Source§

fn from(s: Sighting) -> Self

Converts to this type from the input type.
Source§

impl From<SocketAddr> for StixObjectEnum

Source§

fn from(s: SocketAddr) -> Self

Converts to this type from the input type.
Source§

impl From<Software> for StixObjectEnum

Source§

fn from(s: Software) -> Self

Converts to this type from the input type.
Source§

impl From<SoftwarePackage> for StixObjectEnum

Source§

fn from(s: SoftwarePackage) -> Self

Converts to this type from the input type.
Source§

impl From<ThreatActor> for StixObjectEnum

Source§

fn from(t: ThreatActor) -> Self

Converts to this type from the input type.
Source§

impl From<Tool> for StixObjectEnum

Source§

fn from(t: Tool) -> Self

Converts to this type from the input type.
Source§

impl From<Url> for StixObjectEnum

Source§

fn from(u: Url) -> Self

Converts to this type from the input type.
Source§

impl From<UserAccount> for StixObjectEnum

Source§

fn from(u: UserAccount) -> Self

Converts to this type from the input type.
Source§

impl From<Vulnerability> for StixObjectEnum

Source§

fn from(v: Vulnerability) -> Self

Converts to this type from the input type.
Source§

impl From<WindowsRegistryKey> for StixObjectEnum

Source§

fn from(w: WindowsRegistryKey) -> Self

Converts to this type from the input type.
Source§

impl From<X509Certificate> for StixObjectEnum

Source§

fn from(x: X509Certificate) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for StixObjectEnum

Source§

fn eq(&self, other: &StixObjectEnum) -> 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 Serialize for StixObjectEnum

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 StructuralPartialEq for StixObjectEnum

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<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>,