pub struct ComponentDeps {
pub sites: Vec<SiteDeps>,
pub derived: BTreeMap<Symbol, BTreeSet<Symbol>>,
pub writes: BTreeMap<String, BTreeSet<Symbol>>,
}Expand description
The whole graph for one component.
Fields§
§sites: Vec<SiteDeps>Sites in document order.
derived: BTreeMap<Symbol, BTreeSet<Symbol>>Each derived field and the base state fields it is computed from.
writes: BTreeMap<String, BTreeSet<Symbol>>Each turn (an action by name, an event handler by its trigger) and what it writes.
Implementations§
Source§impl ComponentDeps
impl ComponentDeps
Sourcepub fn sites_reading(&self, field: Symbol) -> impl Iterator<Item = &SiteDeps>
pub fn sites_reading(&self, field: Symbol) -> impl Iterator<Item = &SiteDeps>
The sites a write to field invalidates.
Sourcepub fn describe(&self, interner: &Interner) -> Vec<String>
pub fn describe(&self, interner: &Interner) -> Vec<String>
A deterministic line per fact: sites in document order, then the derived graph, then the write sets. Emitting from the maps’ iteration order would make every downstream lock a coin flip and every generated patcher differ between builds of one source.
Trait Implementations§
Source§impl Clone for ComponentDeps
impl Clone for ComponentDeps
Source§fn clone(&self) -> ComponentDeps
fn clone(&self) -> ComponentDeps
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ComponentDeps
impl RefUnwindSafe for ComponentDeps
impl Send for ComponentDeps
impl Sync for ComponentDeps
impl Unpin for ComponentDeps
impl UnsafeUnpin for ComponentDeps
impl UnwindSafe for ComponentDeps
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