Struct attck::CollectionBuilder[][src]

pub struct CollectionBuilder { /* fields omitted */ }

Implementations

impl CollectionBuilder[src]

pub fn insert<D: Into<Declaration>>(&mut self, object: D) -> Option<Declaration>[src]

Insert an item into the collection.

If a resource with the same ID already exists in the collection, the older value is returned inside Some(_).

pub fn add_bundle(&mut self, bundle: Bundle<Declaration>)[src]

Add a bundle to the collection.

ID Collisions

If any of the IDs for objects in bundle were already in self, they will be replaced with the new values.

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.

pub fn build(self) -> Collection[src]

Finish adding items to the collection and index it for querying.

Trait Implementations

impl Default for CollectionBuilder[src]

impl<D: Into<Declaration>> Extend<D> for CollectionBuilder[src]

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

impl<'a> Into<RelationshipGraph<'a>> for &'a CollectionBuilder[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.