Struct ra_ap_hir::ConstParam
source · pub struct ConstParam { /* private fields */ }
Implementations§
source§impl ConstParam
impl ConstParam
pub fn merge(self) -> TypeOrConstParam
pub fn name(self, db: &dyn HirDatabase) -> Name
pub fn module(self, db: &dyn HirDatabase) -> Module
pub fn parent(self, _db: &dyn HirDatabase) -> GenericDef
pub fn ty(self, db: &dyn HirDatabase) -> Type
pub fn default(self, db: &dyn HirDatabase) -> Option<ConstArg>
Trait Implementations§
source§impl Clone for ConstParam
impl Clone for ConstParam
source§fn clone(&self) -> ConstParam
fn clone(&self) -> ConstParam
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 ConstParam
impl Debug for ConstParam
source§impl From<ConstParam> for ConstParamId
impl From<ConstParam> for ConstParamId
source§fn from(ty: ConstParam) -> ConstParamId
fn from(ty: ConstParam) -> ConstParamId
Converts to this type from the input type.
source§impl From<ConstParam> for GenericParam
impl From<ConstParam> for GenericParam
source§fn from(it: ConstParam) -> GenericParam
fn from(it: ConstParam) -> GenericParam
Converts to this type from the input type.
source§impl From<ConstParamId> for ConstParam
impl From<ConstParamId> for ConstParam
source§fn from(id: ConstParamId) -> ConstParam
fn from(id: ConstParamId) -> ConstParam
Converts to this type from the input type.
source§impl HasAttrs for ConstParam
impl HasAttrs for ConstParam
fn attrs(self, db: &dyn HirDatabase) -> AttrsWithOwner
source§impl Hash for ConstParam
impl Hash for ConstParam
source§impl HirDisplay for ConstParam
impl HirDisplay for ConstParam
fn hir_fmt(&self, f: &mut HirFormatter<'_>) -> Result<(), HirDisplayError>
source§fn into_displayable<'a>(
&'a self,
db: &'a dyn HirDatabase,
max_size: Option<usize>,
limited_size: Option<usize>,
omit_verbose_types: bool,
display_target: DisplayTarget,
closure_style: ClosureStyle
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn into_displayable<'a>(
&'a self,
db: &'a dyn HirDatabase,
max_size: Option<usize>,
limited_size: Option<usize>,
omit_verbose_types: bool,
display_target: DisplayTarget,
closure_style: ClosureStyle
) -> 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) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn display<'a>(&'a self, db: &'a dyn HirDatabase) -> 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,
max_size: Option<usize>
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn display_truncated<'a>(
&'a self,
db: &'a dyn HirDatabase,
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_limited<'a>(
&'a self,
db: &'a dyn HirDatabase,
limited_size: Option<usize>
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn display_limited<'a>(
&'a self,
db: &'a dyn HirDatabase,
limited_size: Option<usize>
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
Returns a
Display
able type that is human-readable and tries to limit the number of items inside.
Use this for showing definitions which may contain too many items, like trait
, struct
, enum
source§fn display_source_code<'a>(
&'a self,
db: &'a dyn HirDatabase,
module_id: ModuleId,
allow_opaque: bool
) -> Result<String, DisplaySourceCodeError>
fn display_source_code<'a>( &'a self, db: &'a dyn HirDatabase, module_id: ModuleId, allow_opaque: bool ) -> 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
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
fn display_test<'a>(
&'a self,
db: &'a dyn HirDatabase
) -> HirDisplayWrapper<'a, Self>where
Self: Sized,
Returns a String representation of
self
for test purposessource§impl PartialEq for ConstParam
impl PartialEq for ConstParam
source§fn eq(&self, other: &ConstParam) -> bool
fn eq(&self, other: &ConstParam) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ConstParam
impl Eq for ConstParam
impl StructuralPartialEq for ConstParam
Auto Trait Implementations§
impl Freeze for ConstParam
impl RefUnwindSafe for ConstParam
impl Send for ConstParam
impl Sync for ConstParam
impl Unpin for ConstParam
impl UnwindSafe for ConstParam
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> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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.