Struct attck::CollectionBuilder [−][src]
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]
fn default() -> CollectionBuilder
[src]
impl<D: Into<Declaration>> Extend<D> for CollectionBuilder
[src]
fn extend<T: IntoIterator<Item = D>>(&mut self, iter: T)
[src]
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl From<Bundle<Declaration>> for CollectionBuilder
[src]
fn from(bundle: Bundle<Declaration>) -> Self
[src]
impl<'a> Into<RelationshipGraph<'a>> for &'a CollectionBuilder
[src]
fn into(self) -> RelationshipGraph<'a>
[src]
Auto Trait Implementations
impl RefUnwindSafe for CollectionBuilder
impl Send for CollectionBuilder
impl Sync for CollectionBuilder
impl Unpin for CollectionBuilder
impl UnwindSafe for CollectionBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,