[][src]Struct daab::ArtifactCache

pub struct ArtifactCache { /* fields omitted */ }

Central structure to prevent dependency duplication on building.

Methods

impl ArtifactCache[src]

pub fn new() -> Self[src]

Creates new empty cache

pub fn get<B: Builder + 'static>(
    &mut self,
    builder: &ArtifactPromise<B>
) -> Rc<B::Artifact> where
    <B as Builder>::Artifact: 'static, 
[src]

Gets the artifact of the given builder.

This method looksup whether the artifact for the given builder is still present in the cache, or it will use the builder to build and store the artifact.

 Notice the given builder will be stored keept to prevent it from deallocating. clear() must be called inorder to free those Rcs.

pub fn clear(&mut self)[src]

Clears the entire cache including all hold builder Rcs.

pub fn invalidate<B: Builder + 'static>(&mut self, cap: &ArtifactPromise<B>)[src]

Clears the entire cache including all hold builder Rcs.

Trait Implementations

impl Default for ArtifactCache[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.