pub fn get_field_def_id_by_name(ty: Ty<'_>, name: Symbol) -> Option<DefId>
Attempts to find the field’s DefId by name. Returns None if the type is not an ADT or the field is not found.
DefId
None