Skip to main content

get_field_def_id_by_name

Function get_field_def_id_by_name 

Source
pub fn get_field_def_id_by_name(ty: Ty<'_>, name: Symbol) -> Option<DefId>
Expand description

Attempts to find the field’s DefId by name. Returns None if the type is not an ADT or the field is not found.