pub struct WorkCache<'a, En: Engine> {
pub engine: &'a En,
pub sts: BTreeMap<BTreeSet<Hash>, <En as Engine>::Dat>,
}Fields§
§engine: &'a En§sts: BTreeMap<BTreeSet<Hash>, <En as Engine>::Dat>Implementations§
Source§impl<'a, En: Engine> WorkCache<'a, En>
impl<'a, En: Engine> WorkCache<'a, En>
pub fn new(engine: &'a En, init_data: En::Dat) -> Self
Sourcepub fn run_recursively(
&mut self,
graph: &Graph<En::Arg>,
tt: BTreeSet<Hash>,
main_evid: Hash,
incl: IncludeSpec,
) -> RunResult<'_, En>
pub fn run_recursively( &mut self, graph: &Graph<En::Arg>, tt: BTreeSet<Hash>, main_evid: Hash, incl: IncludeSpec, ) -> RunResult<'_, En>
this returns an error if tt is not present in sts.
pub fn run_foreach_recursively( &mut self, graph: &Graph<En::Arg>, evids: BTreeMap<Hash, IncludeSpec>, ) -> RunResult<'_, En>
Sourcepub fn shelve_event(
&mut self,
graph: &mut Graph<En::Arg>,
seed_deps: BTreeSet<Hash>,
ev: Event<En::Arg>,
) -> Result<Option<Hash>, WorkCacheError<En::Error>>
pub fn shelve_event( &mut self, graph: &mut Graph<En::Arg>, seed_deps: BTreeSet<Hash>, ev: Event<En::Arg>, ) -> Result<Option<Hash>, WorkCacheError<En::Error>>
NOTE: this ignores the contents of ev.deps
pub fn check_if_mergable( &mut self, graph: &Graph<En::Arg>, sts: BTreeSet<Hash>, ) -> Result<Option<Self>, WorkCacheError<En::Error>>
Trait Implementations§
Auto Trait Implementations§
impl<'a, En> Freeze for WorkCache<'a, En>
impl<'a, En> RefUnwindSafe for WorkCache<'a, En>
impl<'a, En> Send for WorkCache<'a, En>
impl<'a, En> Sync for WorkCache<'a, En>
impl<'a, En> Unpin for WorkCache<'a, En>
impl<'a, En> UnwindSafe for WorkCache<'a, En>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more