Struct rustc_resolve::NameBinding [−][src]
pub struct NameBinding<'a> {
kind: NameBindingKind<'a>,
ambiguity: Option<(&'a NameBinding<'a>, AmbiguityKind)>,
expansion: ExpnId,
span: Span,
vis: Visibility,
}Expand description
Records a possibly-private value, type, or module definition.
Fields
kind: NameBindingKind<'a>ambiguity: Option<(&'a NameBinding<'a>, AmbiguityKind)>expansion: ExpnIdspan: Spanvis: VisibilityImplementations
impl<'a> NameBinding<'a>[src]
impl<'a> NameBinding<'a>[src]pub(crate) fn module(&self) -> Option<&'a ModuleData<'a>>[src]
pub(crate) fn res(&self) -> Res<NodeId>[src]
pub(crate) fn is_ambiguity(&self) -> bool[src]
pub(crate) fn is_possibly_imported_variant(&self) -> bool[src]
pub(crate) fn is_extern_crate(&self) -> bool[src]
pub(crate) fn is_import(&self) -> bool[src]
pub(crate) fn is_glob_import(&self) -> bool[src]
pub(crate) fn is_importable(&self) -> bool[src]
pub(crate) fn is_macro_def(&self) -> bool[src]
pub(crate) fn macro_kind(&self) -> Option<MacroKind>[src]
pub(crate) fn may_appear_after(
&self,
invoc_parent_expansion: ExpnId,
binding: &NameBinding<'_>
) -> bool[src]
&self,
invoc_parent_expansion: ExpnId,
binding: &NameBinding<'_>
) -> bool
Trait Implementations
impl<'a> Clone for NameBinding<'a>[src]
impl<'a> Clone for NameBinding<'a>[src]fn clone(&self) -> NameBinding<'a>[src]
fn clone(&self) -> NameBinding<'a>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl<'a> Debug for NameBinding<'a>[src]
impl<'a> Debug for NameBinding<'a>[src]impl<'a> ToNameBinding<'a> for &'a NameBinding<'a>[src]
impl<'a> ToNameBinding<'a> for &'a NameBinding<'a>[src]fn to_name_binding(self, _: &'a ResolverArenas<'a>) -> &'a NameBinding<'a>[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for NameBinding<'a>
impl<'a> !Send for NameBinding<'a>
impl<'a> !Sync for NameBinding<'a>
impl<'a> Unpin for NameBinding<'a>
impl<'a> !UnwindSafe for NameBinding<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more