Struct attck::Collection[][src]

pub struct Collection { /* fields omitted */ }

An immutable collection of STIX objects.

A collection has no special meaning beyond being a set of STIX objects all loaded in memory at once.

Usage

Create a Collection by deserializing JSON into Bundle instances and then adding those to a CollectionBuilder. Once all bundles are loaded, call CollectionBuilder::build to finish the collection, which will index the objects and prepare the collection for querying.

Implementations

impl Collection[src]

pub fn builder() -> CollectionBuilder[src]

Create a new CollectionBuilder.

pub fn get<'id, 'a: 'id, D>(&'a self, id: &'id Id) -> Option<Node<'a, D>> where
    Ref<'id, 'a, D>: Resolve<Output = Node<'a, D>>, 
[src]

Get the object identified by id if it is present in the collection. This function returns a Node which provides access to the object’s data and its relationships within the collection.

pub fn is_empty(&self) -> bool[src]

Get whether the collection has no items.

pub fn len(&self) -> usize[src]

Get the number of objects in the collection.

impl Collection[src]

Accessors for STIX objects in the collection.

pub fn attack_patterns<'a>(
    &'a self
) -> impl Iterator<Item = Node<'a, AttackPattern>>
[src]

pub fn courses_of_action<'a>(
    &'a self
) -> impl Iterator<Item = Node<'a, CourseOfAction>>
[src]

pub fn malware<'a>(&'a self) -> impl Iterator<Item = Node<'a, Malware>>[src]

pub fn matrices<'a>(&'a self) -> impl Iterator<Item = Node<'a, Matrix>>[src]

pub fn tactics<'a>(&'a self) -> impl Iterator<Item = Node<'a, Tactic>>[src]

pub fn tools<'a>(&'a self) -> impl Iterator<Item = Node<'a, Tool>>[src]

pub fn campaigns<'a>(&'a self) -> impl Iterator<Item = Node<'a, Campaign>>[src]

pub fn identities<'a>(&'a self) -> impl Iterator<Item = Node<'a, Identity>>[src]

pub fn intrusion_sets<'a>(
    &'a self
) -> impl Iterator<Item = Node<'a, IntrusionSet>>
[src]

pub fn infrastructure<'a>(
    &'a self
) -> impl Iterator<Item = Node<'a, Infrastructure>>
[src]

pub fn locations<'a>(&'a self) -> impl Iterator<Item = Node<'a, Location>>[src]

pub fn marking_definitions<'a>(
    &'a self
) -> impl Iterator<Item = Node<'a, MarkingDefinition>>
[src]

pub fn relationships<'a>(
    &'a self
) -> impl Iterator<Item = Node<'a, Relationship>>
[src]

pub fn threat_actors<'a>(
    &'a self
) -> impl Iterator<Item = Node<'a, ThreatActor>>
[src]

pub fn vulnerabilities<'a>(
    &'a self
) -> impl Iterator<Item = Node<'a, Vulnerability>>
[src]

Trait Implementations

impl From<Bundle<Declaration>> for Collection[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.