ToDef

Trait ToDef 

Source
pub trait ToDef: AstNode + Clone {
    type Def;

    // Required method
    fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>;
}

Required Associated Types§

Required Methods§

Source

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToDef for Adt

Source§

type Def = Adt

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for AsmOperandNamed

Source§

type Def = InlineAsmOperand

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Const

Source§

type Def = Const

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for ConstParam

Source§

type Def = ConstParam

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Enum

Source§

type Def = Enum

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for ExternBlock

Source§

type Def = ExternBlock

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for ExternCrate

Source§

type Def = ExternCrateDecl

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Fn

Source§

type Def = Function

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for GenericParam

Source§

type Def = GenericParam

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for IdentPat

Source§

type Def = Local

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Impl

Source§

type Def = Impl

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Label

Source§

type Def = Label

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for LifetimeParam

Source§

type Def = LifetimeParam

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Macro

Source§

type Def = Macro

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for MacroCall

Source§

type Def = MacroCallId

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Module

Source§

type Def = Module

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for RecordField

Source§

type Def = Field

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for SelfParam

Source§

type Def = Local

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for SourceFile

Source§

type Def = Module

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Static

Source§

type Def = Static

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Struct

Source§

type Def = Struct

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Trait

Source§

type Def = Trait

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for TupleField

Source§

type Def = Field

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for TypeAlias

Source§

type Def = TypeAlias

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for TypeParam

Source§

type Def = TypeParam

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Union

Source§

type Def = Union

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Source§

impl ToDef for Variant

Source§

type Def = EnumVariant

Source§

fn to_def(sema: &SemanticsImpl<'_>, src: InFile<&Self>) -> Option<Self::Def>

Implementors§