pub struct SurfaceIdent {
pub name: String,
pub span: ByteRange,
}Expand description
A raw identifier as it appears in source, together with its span.
Fields§
§name: StringThe identifier string.
span: ByteRangeSource span (byte offsets).
Implementations§
Source§impl SurfaceIdent
impl SurfaceIdent
Sourcepub fn is_synthetic(&self) -> bool
pub fn is_synthetic(&self) -> bool
Whether the identifier was synthesized (not from real source).
Sourcepub fn is_anonymous(&self) -> bool
pub fn is_anonymous(&self) -> bool
Whether the identifier starts with an underscore.
Sourcepub fn is_qualified(&self) -> bool
pub fn is_qualified(&self) -> bool
Whether the identifier contains a dot (qualified name).
Sourcepub fn split_last(&self) -> Option<(&str, &str)>
pub fn split_last(&self) -> Option<(&str, &str)>
Split a qualified name at the last dot, if any.
Trait Implementations§
Source§impl Clone for SurfaceIdent
impl Clone for SurfaceIdent
Source§fn clone(&self) -> SurfaceIdent
fn clone(&self) -> SurfaceIdent
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 moreSource§impl Debug for SurfaceIdent
impl Debug for SurfaceIdent
Source§impl Display for SurfaceIdent
impl Display for SurfaceIdent
Source§impl Hash for SurfaceIdent
impl Hash for SurfaceIdent
Source§impl PartialEq for SurfaceIdent
impl PartialEq for SurfaceIdent
impl Eq for SurfaceIdent
impl StructuralPartialEq for SurfaceIdent
Auto Trait Implementations§
impl Freeze for SurfaceIdent
impl RefUnwindSafe for SurfaceIdent
impl Send for SurfaceIdent
impl Sync for SurfaceIdent
impl Unpin for SurfaceIdent
impl UnsafeUnpin for SurfaceIdent
impl UnwindSafe for SurfaceIdent
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