Enum debris_hir::hir_nodes::HirFunctionName
source · pub enum HirFunctionName {
Ident(SpannedIdentifier),
Unnamed {
file: CodeId,
pos: Span,
},
}
Expand description
Anonymous functions don’t have an explicit identifier, So if the function is unnamed, the hir builder will try to infer it.
Variants§
Implementations§
source§impl HirFunctionName
impl HirFunctionName
pub fn span(&self) -> Span
pub fn spanned_ident(&self) -> Option<SpannedIdentifier>
pub fn is_unknown(&self) -> bool
pub fn into_ident(&self, input_files: &InputFiles) -> Ident
Trait Implementations§
source§impl Clone for HirFunctionName
impl Clone for HirFunctionName
source§fn clone(&self) -> HirFunctionName
fn clone(&self) -> HirFunctionName
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 HirFunctionName
impl Debug for HirFunctionName
source§impl PartialEq for HirFunctionName
impl PartialEq for HirFunctionName
source§fn eq(&self, other: &HirFunctionName) -> bool
fn eq(&self, other: &HirFunctionName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for HirFunctionName
impl Eq for HirFunctionName
impl StructuralEq for HirFunctionName
impl StructuralPartialEq for HirFunctionName
Auto Trait Implementations§
impl RefUnwindSafe for HirFunctionName
impl Send for HirFunctionName
impl Sync for HirFunctionName
impl Unpin for HirFunctionName
impl UnwindSafe for HirFunctionName
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.