pub struct ReferencePath {
pub root: BindingId,
pub chain: Vec<PathElem>,
}Fields§
§root: BindingId§chain: Vec<PathElem>Implementations§
Source§impl ReferencePath
impl ReferencePath
Sourcepub fn is_bare_local(&self) -> bool
pub fn is_bare_local(&self) -> bool
A local itself, with no field or element step. Only such a path can’t change behind a guard’s back, through an alias or in a call.
pub fn root(root: BindingId) -> Self
Sourcepub fn is_prefix_of(&self, other: &ReferencePath) -> bool
pub fn is_prefix_of(&self, other: &ReferencePath) -> bool
Whether a write to self may change what other reads. A key step
of other (o[key]) may name any field or element, so any written
step matches it. A written key matches only itself, as in
TypeScript: values[index] = 4 leaves values[0] narrowed.
pub fn render(&self) -> String
Trait Implementations§
Source§impl Clone for ReferencePath
impl Clone for ReferencePath
Source§impl Debug for ReferencePath
impl Debug for ReferencePath
impl Eq for ReferencePath
Source§impl Hash for ReferencePath
impl Hash for ReferencePath
Source§impl Ord for ReferencePath
impl Ord for ReferencePath
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ReferencePath
impl PartialEq for ReferencePath
Source§impl PartialOrd for ReferencePath
impl PartialOrd for ReferencePath
impl StructuralPartialEq for ReferencePath
Auto Trait Implementations§
impl Freeze for ReferencePath
impl RefUnwindSafe for ReferencePath
impl Send for ReferencePath
impl Sync for ReferencePath
impl Unpin for ReferencePath
impl UnsafeUnpin for ReferencePath
impl UnwindSafe for ReferencePath
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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
Compare self to
key and return true if they are equal.