Struct cairo_lang_defs::diagnostic_utils::StableLocation
source · pub struct StableLocation(/* private fields */);Expand description
A stable location of a real, concrete syntax.
Implementations§
source§impl StableLocation
impl StableLocation
pub fn new(stable_ptr: SyntaxStablePtrId) -> Self
pub fn file_id(&self, db: &dyn DefsGroup) -> FileId
pub fn from_ast<TNode: TypedSyntaxNode>(node: &TNode) -> Self
sourcepub fn syntax_node(&self, db: &dyn DefsGroup) -> SyntaxNode
pub fn syntax_node(&self, db: &dyn DefsGroup) -> SyntaxNode
Returns the SyntaxNode that corresponds to the StableLocation.
sourcepub fn diagnostic_location(&self, db: &dyn DefsGroup) -> DiagnosticLocation
pub fn diagnostic_location(&self, db: &dyn DefsGroup) -> DiagnosticLocation
Returns the DiagnosticLocation that corresponds to the StableLocation.
sourcepub fn diagnostic_location_until(
&self,
db: &dyn DefsGroup,
until_stable_ptr: SyntaxStablePtrId
) -> DiagnosticLocation
pub fn diagnostic_location_until( &self, db: &dyn DefsGroup, until_stable_ptr: SyntaxStablePtrId ) -> DiagnosticLocation
Returns the DiagnosticLocation that corresponds to the StableLocation.
Trait Implementations§
source§impl Clone for StableLocation
impl Clone for StableLocation
source§fn clone(&self) -> StableLocation
fn clone(&self) -> StableLocation
Returns a copy 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 moresource§impl Debug for StableLocation
impl Debug for StableLocation
source§impl Hash for StableLocation
impl Hash for StableLocation
source§impl PartialEq for StableLocation
impl PartialEq for StableLocation
source§fn eq(&self, other: &StableLocation) -> bool
fn eq(&self, other: &StableLocation) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for StableLocation
impl Eq for StableLocation
impl StructuralEq for StableLocation
impl StructuralPartialEq for StableLocation
Auto Trait Implementations§
impl RefUnwindSafe for StableLocation
impl Send for StableLocation
impl Sync for StableLocation
impl Unpin for StableLocation
impl UnwindSafe for StableLocation
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<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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.