pub struct ViewBindingDependencies {
pub references: BTreeMap<u32, BTreeSet<String>>,
pub dependencies: BTreeSet<String>,
pub consulted_facts: BTreeSet<(String, String)>,
pub unattributed: bool,
pub binding_answers: FactAnswers,
pub resolution_answers: FactAnswers,
/* private fields */
}Expand description
Bound reference dependencies and resolver probes are generation-specific, unlike parse blobs. The owner must invalidate these whenever a probed path changes.
Fields§
§references: BTreeMap<u32, BTreeSet<String>>§dependencies: BTreeSet<String>§consulted_facts: BTreeSet<(String, String)>§unattributed: bool§binding_answers: FactAnswersEvery checkout read binding made, with its answer, when answers were
recorded (see super::fact_answers).
resolution_answers: FactAnswersLikewise for resolution’s reads beyond binding’s.
Implementations§
Source§impl ViewBindingDependencies
impl ViewBindingDependencies
Sourcepub fn without_surface(&self) -> Self
pub fn without_surface(&self) -> Self
This binding without its bound file surface, which is not stored: binding computes it again from the file’s own parse.
Sourcepub fn clear_surface(&mut self)
pub fn clear_surface(&mut self)
Drops the bound file surface in place, as a stored resolution never carries it. Resolution never reads it; whoever compares surfaces reads them from the bound file.
Sourcepub fn same_surface(&self, other: &Self) -> bool
pub fn same_surface(&self, other: &Self) -> bool
Whether binding gave this file the surface other recorded, so no
other file’s resolution can read a different answer from it.
Sourcepub fn changed_surface_keys(&self, other: &Self, file: &str) -> BTreeSet<String>
pub fn changed_surface_keys(&self, other: &Self, file: &str) -> BTreeSet<String>
Keys for the answers this surface change can affect. External Rust module declarations have name-scoped readers, including failed lookups. Any other change, or one with no attributable name, keeps the whole-file invalidation used by every kind of surface reader.
Sourcepub fn surface_replays(
&self,
index: &impl ResolverIndex,
changed: &BTreeSet<String>,
answers: &mut BTreeMap<ViewSurfaceQuery, String>,
) -> bool
pub fn surface_replays( &self, index: &impl ResolverIndex, changed: &BTreeSet<String>, answers: &mut BTreeMap<ViewSurfaceQuery, String>, ) -> bool
True when every surface query this resolution asked that depends on
one of changed still has the answer it recorded in index. A query
depending on nothing in changed reads only index entries that are
unchanged. Answers are kept in answers for the next file replayed
against the same index. The memo owns its queries, so the resolutions
replayed need not outlive it.
Sourcepub fn reuse_resolution(&mut self, old: &Self)
pub fn reuse_resolution(&mut self, old: &Self)
Carries a resolution over from old, whose recorded answers replay,
onto this file’s new binding.
Sourcepub fn binding_keys(&self) -> BTreeSet<String>
pub fn binding_keys(&self) -> BTreeSet<String>
The input keys binding recorded, before resolution added its own:
what finish_binding gives a freshly bound file.
Sourcepub fn answers(&self) -> impl Iterator<Item = (&FactQuestion, &FactAnswer)>
pub fn answers(&self) -> impl Iterator<Item = (&FactQuestion, &FactAnswer)>
Every checkout read binding and resolution made, with its answer.
Sourcepub fn all_surface_answers_hold<'q>(
&'q self,
index: &impl ResolverIndex,
answers: &mut BTreeMap<&'q ViewSurfaceQuery, String>,
) -> bool
pub fn all_surface_answers_hold<'q>( &'q self, index: &impl ResolverIndex, answers: &mut BTreeMap<&'q ViewSurfaceQuery, String>, ) -> bool
True when every surface query resolution asked still has its
recorded answer in index, whatever changed.
Trait Implementations§
Source§impl Clone for ViewBindingDependencies
impl Clone for ViewBindingDependencies
Source§impl Debug for ViewBindingDependencies
impl Debug for ViewBindingDependencies
Source§impl Default for ViewBindingDependencies
impl Default for ViewBindingDependencies
Source§impl<'de> Deserialize<'de> for ViewBindingDependencies
impl<'de> Deserialize<'de> for ViewBindingDependencies
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>,
impl Eq for ViewBindingDependencies
Source§impl HeapBytes for ViewBindingDependencies
impl HeapBytes for ViewBindingDependencies
Source§fn heap_bytes(&self, seen: &mut Seen) -> usize
fn heap_bytes(&self, seen: &mut Seen) -> usize
seen has
already counted adds nothing.Source§impl PartialEq for ViewBindingDependencies
impl PartialEq for ViewBindingDependencies
Source§impl Serialize for ViewBindingDependencies
impl Serialize for ViewBindingDependencies
impl StructuralPartialEq for ViewBindingDependencies
Auto Trait Implementations§
impl Forget for ViewBindingDependencies
impl Freeze for ViewBindingDependencies
impl Move for ViewBindingDependencies
impl RefUnwindSafe for ViewBindingDependencies
impl Send for ViewBindingDependencies
impl Sync for ViewBindingDependencies
impl Unpin for ViewBindingDependencies
impl UnsafeUnpin for ViewBindingDependencies
impl UnwindSafe for ViewBindingDependencies
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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