Type Alias TraitRef

Source
pub type TraitRef<'db> = TraitRef<DbInterner<'db>>;

Aliased Type§

pub struct TraitRef<'db> {
    pub def_id: SolverDefId,
    pub args: GenericArgs<'db>,
    /* private fields */
}

Fields§

§def_id: SolverDefId§args: GenericArgs<'db>

Trait Implementations§

Source§

impl<'db> HirDisplay for TraitRef<'db>

Source§

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, display_kind: DisplayKind, closure_style: ClosureStyle, show_container_bounds: bool, ) -> HirDisplayWrapper<'a, Self>
where Self: Sized,

Returns a Displayable type that is human-readable.
Source§

fn display<'a>( &'a self, db: &'a dyn HirDatabase, display_target: DisplayTarget, ) -> HirDisplayWrapper<'a, Self>
where Self: Sized,

Returns a Displayable 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>, display_target: DisplayTarget, ) -> HirDisplayWrapper<'a, Self>
where Self: Sized,

Returns a Displayable 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>, display_target: DisplayTarget, ) -> HirDisplayWrapper<'a, Self>
where Self: Sized,

Returns a Displayable 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>

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, display_target: DisplayTarget, ) -> HirDisplayWrapper<'a, Self>
where Self: Sized,

Returns a String representation of self for test purposes
Source§

fn display_with_container_bounds<'a>( &'a self, db: &'a dyn HirDatabase, show_container_bounds: bool, display_target: DisplayTarget, ) -> HirDisplayWrapper<'a, Self>
where Self: Sized,

Returns a String representation of self that shows the constraint from the container for functions
Source§

impl<'db> ToTrace<'db> for TraitRef<'db>

Source§

fn to_trace(cause: &ObligationCause, a: Self, b: Self) -> TypeTrace<'db>