pub struct Graph<Arg> {
pub events: BTreeMap<Hash, Event<Arg>>,
pub nstates: BTreeMap<String, BTreeSet<Hash>>,
}Fields§
§events: BTreeMap<Hash, Event<Arg>>§nstates: BTreeMap<String, BTreeSet<Hash>>saved combined states
Implementations§
Source§impl<Arg: Serialize> Graph<Arg>
impl<Arg: Serialize> Graph<Arg>
Sourcepub fn fold_state(
&self,
st: BTreeMap<Hash, bool>,
expand: bool,
) -> Option<BTreeMap<Hash, bool>>
pub fn fold_state( &self, st: BTreeMap<Hash, bool>, expand: bool, ) -> Option<BTreeMap<Hash, bool>>
fold a state, expanding of compressing it along the dependencies.
st entries should be initialized to false when creating a state from a BTreeSet<Hash>.
Sourcepub fn debug_exec_order(
&self,
evids: BTreeMap<Hash, IncludeSpec>,
) -> Result<Vec<Hash>, GraphError>
pub fn debug_exec_order( &self, evids: BTreeMap<Hash, IncludeSpec>, ) -> Result<Vec<Hash>, GraphError>
utility function for debugging of incorrect evaluation orders
Source§impl<Arg> Graph<Arg>
impl<Arg> Graph<Arg>
Sourcepub fn ensure_event(&mut self, ev: Event<Arg>) -> (Option<Event<Arg>>, Hash)where
Arg: CommandArg,
pub fn ensure_event(&mut self, ev: Event<Arg>) -> (Option<Event<Arg>>, Hash)where
Arg: CommandArg,
get-or-insert event, check if it matches
@returns (Some(@arg ev) if collision else None, Hash of @arg ev)
Trait Implementations§
Source§impl<'de, Arg> Deserialize<'de> for Graph<Arg>where
Arg: Deserialize<'de>,
impl<'de, Arg> Deserialize<'de> for Graph<Arg>where
Arg: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<Arg: Eq> Eq for Graph<Arg>
impl<Arg> StructuralPartialEq for Graph<Arg>
Auto Trait Implementations§
impl<Arg> Freeze for Graph<Arg>
impl<Arg> RefUnwindSafe for Graph<Arg>where
Arg: RefUnwindSafe,
impl<Arg> Send for Graph<Arg>where
Arg: Send,
impl<Arg> Sync for Graph<Arg>where
Arg: Sync,
impl<Arg> Unpin for Graph<Arg>
impl<Arg> UnwindSafe for Graph<Arg>where
Arg: RefUnwindSafe,
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