Skip to main content

LocalItemData

Struct LocalItemData 

Source
pub struct LocalItemData {
Show 14 fields pub id: LocalItemId, pub module: ModuleId, pub file: FileId, pub parent_enum: LocalItemId, pub index_def: GlobalDefId, pub kind: ItemKind, pub vis: VisKind, pub vis_mod: ModuleId, pub has_value_ctor: bool, pub macro_export: bool, pub var_start: u32, pub var_len: u16, pub span_start: u32, pub span_end: u32, /* private fields */
}
Expand description

Compact descriptor of one locally defined item (or enum variant) inside super::def_map::CrateDefMap.

Fields§

§id: LocalItemId§module: ModuleId§file: FileId§parent_enum: LocalItemId

Owning LocalItemId when kind == ItemKind::Variant, otherwise LocalItemId::NONE.

§index_def: GlobalDefId

Matched compiler GlobalDefId from ItemDb (GlobalDefId::NONE for brand-new unindexed items).

§kind: ItemKind§vis: VisKind§vis_mod: ModuleId§has_value_ctor: bool§macro_export: bool§var_start: u32§var_len: u16§span_start: u32§span_end: u32

Trait Implementations§

Source§

impl Clone for LocalItemData

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for LocalItemData

Source§

impl Debug for LocalItemData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.