[−][src]Struct daab::ArtifactCache
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]
&mut self,
builder: &ArtifactPromise<B>
) -> Rc<B::Artifact> where
<B as Builder>::Artifact: 'static,
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
impl !RefUnwindSafe for ArtifactCache
impl !Send for ArtifactCache
impl !Sync for ArtifactCache
impl Unpin for ArtifactCache
impl !UnwindSafe for ArtifactCache
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,
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.
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>,