Struct ra_ap_hir::LifetimeParam
source · pub struct LifetimeParam { /* private fields */ }
Implementations§
source§impl LifetimeParam
impl LifetimeParam
pub fn name(self, db: &dyn HirDatabase) -> Name
pub fn module(self, db: &dyn HirDatabase) -> Module
pub fn parent(self, _db: &dyn HirDatabase) -> GenericDef
Trait Implementations§
source§impl Clone for LifetimeParam
impl Clone for LifetimeParam
source§fn clone(&self) -> LifetimeParam
fn clone(&self) -> LifetimeParam
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 LifetimeParam
impl Debug for LifetimeParam
source§impl From<LifetimeParam> for GenericParam
impl From<LifetimeParam> for GenericParam
source§fn from(it: LifetimeParam) -> GenericParam
fn from(it: LifetimeParam) -> GenericParam
Converts to this type from the input type.
source§impl From<LifetimeParam> for LifetimeParamId
impl From<LifetimeParam> for LifetimeParamId
source§fn from(ty: LifetimeParam) -> LifetimeParamId
fn from(ty: LifetimeParam) -> LifetimeParamId
Converts to this type from the input type.
source§impl From<LifetimeParamId> for LifetimeParam
impl From<LifetimeParamId> for LifetimeParam
source§fn from(id: LifetimeParamId) -> LifetimeParam
fn from(id: LifetimeParamId) -> LifetimeParam
Converts to this type from the input type.
source§impl HasAttrs for LifetimeParam
impl HasAttrs for LifetimeParam
fn attrs(self, db: &dyn HirDatabase) -> AttrsWithOwner
fn docs(self, db: &dyn HirDatabase) -> Option<Documentation>
fn resolve_doc_path(
self,
db: &dyn HirDatabase,
link: &str,
ns: Option<Namespace>
) -> Option<ModuleDef>
source§impl HasSource for LifetimeParam
impl HasSource for LifetimeParam
type Ast = LifetimeParam
source§fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>>
fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>>
Fetches the definition’s source node.
Using
crate::Semantics::source
is preferred when working with crate::Semantics
,
as that caches the parsed file in the semantics’ cache.source§impl Hash for LifetimeParam
impl Hash for LifetimeParam
source§impl HirDisplay for LifetimeParam
impl HirDisplay for LifetimeParam
fn hir_fmt(&self, f: &mut HirFormatter<'_>) -> Result<(), HirDisplayError>
source§fn into_displayable<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a),
max_size: Option<usize>,
omit_verbose_types: bool,
display_target: DisplayTarget
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn into_displayable<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a),
max_size: Option<usize>,
omit_verbose_types: bool,
display_target: DisplayTarget
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
Returns a
Display
able type that is human-readable.source§fn display<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a)
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn display<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a)
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
Returns a
Display
able type that is human-readable.
Use this for showing types to the user (e.g. diagnostics)source§fn display_truncated<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a),
max_size: Option<usize>
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn display_truncated<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a),
max_size: Option<usize>
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
Returns a
Display
able type that is human-readable and tries to be succinct.
Use this for showing types to the user where space is constrained (e.g. doc popups)source§fn display_source_code<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a),
module_id: ModuleId
) -> Result<String, DisplaySourceCodeError>
fn display_source_code<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a),
module_id: ModuleId
) -> Result<String, DisplaySourceCodeError>
Returns a String representation of
self
that can be inserted into the given module.
Use this when generating code (e.g. assists)source§fn display_test<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a)
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn display_test<'a>(
&'a self,
db: &'a (dyn HirDatabase + 'a)
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
Returns a String representation of
self
for test purposessource§impl PartialEq<LifetimeParam> for LifetimeParam
impl PartialEq<LifetimeParam> for LifetimeParam
source§fn eq(&self, other: &LifetimeParam) -> bool
fn eq(&self, other: &LifetimeParam) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for LifetimeParam
impl Eq for LifetimeParam
impl StructuralEq for LifetimeParam
impl StructuralPartialEq for LifetimeParam
Auto Trait Implementations§
impl RefUnwindSafe for LifetimeParam
impl Send for LifetimeParam
impl Sync for LifetimeParam
impl Unpin for LifetimeParam
impl UnwindSafe for LifetimeParam
Blanket Implementations§
§impl<T> Cast for T
impl<T> Cast for T
source§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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.