[−][src]Struct spirit::fragment::driver::CacheEq
A Driver
that caches the Resource
if the Fragment
doesn't change at all.
Most of the time, the configuration is the same or almost the same ‒ so many Resource
s
don't need to be changed. This driver keeps the old instance of the Fragment
and if the new
one compares equal, it does nothing (eg. keeps the old instance of the Resource
).
Trait Implementations
impl<Fragment: Debug + ToOwned> Debug for CacheEq<Fragment> where
Fragment::Owned: Debug,
Fragment::Owned: Debug,
[src]
Fragment::Owned: Debug,
Fragment::Owned: Debug,
impl<F: ToOwned> Default for CacheEq<F>
[src]
impl<F> Driver<F> for CacheEq<F> where
F: Debug + Fragment + ToOwned + PartialEq<<F as ToOwned>::Owned>,
[src]
F: Debug + Fragment + ToOwned + PartialEq<<F as ToOwned>::Owned>,
type SubFragment = F
fn instructions<T, I>(
&mut self,
fragment: &F,
transform: &mut T,
name: &'static str
) -> Result<Vec<Instruction<T::OutputResource>>, Vec<AnyError>> where
T: Transformation<F::Resource, I, F>,
[src]
&mut self,
fragment: &F,
transform: &mut T,
name: &'static str
) -> Result<Vec<Instruction<T::OutputResource>>, Vec<AnyError>> where
T: Transformation<F::Resource, I, F>,
fn abort(&mut self, name: &'static str)
[src]
fn confirm(&mut self, name: &'static str)
[src]
fn maybe_cached(&self, fragment: &F, _name: &'static str) -> bool
[src]
Auto Trait Implementations
impl<Fragment> RefUnwindSafe for CacheEq<Fragment> where
<Fragment as ToOwned>::Owned: RefUnwindSafe,
<Fragment as ToOwned>::Owned: RefUnwindSafe,
impl<Fragment> Send for CacheEq<Fragment> where
<Fragment as ToOwned>::Owned: Send,
<Fragment as ToOwned>::Owned: Send,
impl<Fragment> Sync for CacheEq<Fragment> where
<Fragment as ToOwned>::Owned: Sync,
<Fragment as ToOwned>::Owned: Sync,
impl<Fragment> Unpin for CacheEq<Fragment> where
<Fragment as ToOwned>::Owned: Unpin,
<Fragment as ToOwned>::Owned: Unpin,
impl<Fragment> UnwindSafe for CacheEq<Fragment> where
<Fragment as ToOwned>::Owned: UnwindSafe,
<Fragment as ToOwned>::Owned: UnwindSafe,
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> IntoResult<T> for T
[src]
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>,