Struct spirit::fragment::driver::CacheEq [−][src]
pub struct CacheEq<Fragment: ToOwned> { /* fields omitted */ }
Expand description
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
type SubFragment = F
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>,
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>,
Issues the instructions how to transition to the new fragment. Read more
Call to this method informs the Driver
that the instructions returned by the last call
to instructions
were not followed and were dropped. Read more
Call to this method informs the Driver
that the instructions returned by the last call
to instructions
were followed and the changes have taken place. Read more