pub struct ObjectStore { /* private fields */ }Expand description
An id → object index built from a bundle or a list of objects. Used by the
matcher to resolve object_refs and reference properties (e.g. src_ref).
Implementations§
Source§impl ObjectStore
impl ObjectStore
Sourcepub fn from_objects(objects: &[StixObject]) -> Self
pub fn from_objects(objects: &[StixObject]) -> Self
Build a store from a slice of objects. Objects without an id are skipped.
Sourcepub fn from_bundle(bundle: &Bundle) -> Self
pub fn from_bundle(bundle: &Bundle) -> Self
Build a store from a bundle’s objects.
Sourcepub fn get(&self, id: &str) -> Option<&StixObject>
pub fn get(&self, id: &str) -> Option<&StixObject>
Resolve an object by id.
Trait Implementations§
Source§impl Clone for ObjectStore
impl Clone for ObjectStore
Source§fn clone(&self) -> ObjectStore
fn clone(&self) -> ObjectStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjectStore
impl Debug for ObjectStore
Source§impl Default for ObjectStore
impl Default for ObjectStore
Source§fn default() -> ObjectStore
fn default() -> ObjectStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ObjectStore
impl !UnwindSafe for ObjectStore
impl Freeze for ObjectStore
impl Send for ObjectStore
impl Sync for ObjectStore
impl Unpin for ObjectStore
impl UnsafeUnpin for ObjectStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more