pub enum Elem {
ElemFunction(Function),
ElemClass(Class),
ElemStruct(Struct),
ElemTrait(Trait),
ElemImpl(Impl),
ElemModule(Module),
ElemGlobal(Global),
ElemConst(Const),
ElemEnum(Enum),
}
Variants§
ElemFunction(Function)
ElemClass(Class)
ElemStruct(Struct)
ElemTrait(Trait)
ElemImpl(Impl)
ElemModule(Module)
ElemGlobal(Global)
ElemConst(Const)
ElemEnum(Enum)
Implementations§
Source§impl Elem
impl Elem
pub fn id(&self) -> NodeId
pub fn to_function(&self) -> Option<&Function>
pub fn to_class(&self) -> Option<&Class>
pub fn to_struct(&self) -> Option<&Struct>
pub fn to_trait(&self) -> Option<&Trait>
pub fn to_impl(&self) -> Option<&Impl>
pub fn to_module(&self) -> Option<&Module>
pub fn to_global(&self) -> Option<&Global>
pub fn to_const(&self) -> Option<&Const>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Elem
impl RefUnwindSafe for Elem
impl Send for Elem
impl Sync for Elem
impl Unpin for Elem
impl UnwindSafe for Elem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)