pub struct LangObj { /* private fields */ }
Expand description
A LangObj describes a named language entity such as a package, constant, type, variable, function (incl. methods), or label.
Implementations§
source§impl LangObj
impl LangObj
pub fn new_pkg_name( pos: Pos, pkg: Option<PackageKey>, name: String, imported: PackageKey, univ: &Universe ) -> LangObj
pub fn new_const( pos: Pos, pkg: Option<PackageKey>, name: String, typ: Option<TypeKey>, val: Value ) -> LangObj
pub fn new_type_name( pos: Pos, pkg: Option<PackageKey>, name: String, typ: Option<TypeKey> ) -> LangObj
pub fn new_var( pos: Pos, pkg: Option<PackageKey>, name: String, typ: Option<TypeKey> ) -> LangObj
pub fn new_param_var( pos: Pos, pkg: Option<PackageKey>, name: String, typ: Option<TypeKey> ) -> LangObj
pub fn new_field( pos: Pos, pkg: Option<PackageKey>, name: String, typ: Option<TypeKey>, embedded: bool ) -> LangObj
pub fn new_func( pos: Pos, pkg: Option<PackageKey>, name: String, typ: Option<TypeKey> ) -> LangObj
pub fn new_label( pos: Pos, pkg: Option<PackageKey>, name: String, univ: &Universe ) -> LangObj
pub fn new_builtin(f: Builtin, name: String, typ: TypeKey) -> LangObj
pub fn new_nil(typ: TypeKey) -> LangObj
pub fn entity_type(&self) -> &EntityType
pub fn entity_type_mut(&mut self) -> &mut EntityType
pub fn parent(&self) -> Option<ScopeKey>
pub fn pos(&self) -> Pos
pub fn name(&self) -> &String
pub fn typ(&self) -> Option<TypeKey>
pub fn pkg(&self) -> Option<PackageKey>
pub fn exported(&self) -> bool
pub fn id(&self, objs: &TCObjects) -> Cow<'_, str>
pub fn order(&self) -> u32
pub fn scope_pos(&self) -> &Pos
pub fn set_order(&mut self, order: u32)
pub fn same_id( &self, pkg: Option<PackageKey>, name: &str, objs: &TCObjects ) -> bool
pub fn pkg_name_imported(&self) -> PackageKey
pub fn const_val(&self) -> &Value
pub fn var_embedded(&self) -> bool
pub fn var_is_field(&self) -> bool
pub fn func_fmt_name(&self, f: &mut Formatter<'_>, objs: &TCObjects) -> Result
pub fn func_scope(&self) -> &ScopeKey
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for LangObj
impl Send for LangObj
impl Sync for LangObj
impl Unpin for LangObj
impl UnwindSafe for LangObj
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more