DefId in rustc_infer::infer::canonical::ir::inherent - Rust
Description: API documentation for the Rust `DefId` trait in crate `rustc_infer`.

Skip to main content

## DefId

# Trait DefId

Source

    pub trait DefId<I, Local = <I as Interner>::LocalDefId>:
        Copy
        + Debug
        + Hash
        + Eq
        + TypeFoldable<I>where
        I: Interner,{
        // Required methods
        fn is_local(self) -> bool;
        fn as_local(self) -> Option<Local>;
    }

## Required Methods§

Source

#### fn is_local(self) -> bool

Source

#### fn as_local(self) -> Option<Local>

## Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

## Implementations on Foreign Types§

Source§

### impl<'tcx> DefId<TyCtxt<'tcx>> for DefId

Source§

#### fn is_local(self) -> bool

Source§

#### fn as_local(self) -> Option<LocalDefId>

## Implementors§