1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
mod attack_pattern;
mod bundle;
mod campaign;
mod course_of_action;
mod id;
pub mod identity;
mod infrastructure;
mod intrusion_set;
pub mod location;
mod malware;
mod marking_definition;
mod object;
mod reference;
pub mod relationship;
mod relationship_graph;
pub mod standard;
mod threat_actor;
mod tool;
pub mod vocab;
mod vulnerability;

pub use attack_pattern::AttackPattern;
pub use bundle::Bundle;
pub use campaign::Campaign;
pub use course_of_action::CourseOfAction;
pub use id::{Id, IdParseError};
#[doc(inline)]
pub use identity::Identity;
pub use infrastructure::Infrastructure;
pub use intrusion_set::IntrusionSet;
pub use location::Location;
pub use malware::Malware;
pub use marking_definition::MarkingDefinition;
pub use object::{CommonProperties, Object, TypedObject};
pub use reference::{ExternalReference, KillChainPhase};
pub use relationship::{Relationship, RelationshipType};
pub use relationship_graph::RelationshipGraph;
pub use threat_actor::ThreatActor;
pub use tool::Tool;
pub use vulnerability::Vulnerability;

pub use stix_derive::*;

#[doc(hidden)]
pub mod export {
    pub use indexmap::IndexMap;
    pub use once_self_cell::sync_once_self_cell;
    pub mod petgraph {
        pub use ::petgraph::{graph::NodeIndex, Graph};
    }
}

/// Trait for turning a reference in a STIX collection into a data-carrying node.
pub trait Resolve {
    /// The node type, containing a reference to the data and the backing collection.
    type Output;

    /// Produce a collection-attached node for the object identified by the ID.
    fn resolve(self) -> Option<Self::Output>;
}