#[non_exhaustive]pub enum Binding {
Local,
Global,
Weak,
}Expand description
Who can see a symbol: this object only, or every object in the link.
§Examples
use object_lang::{Binding, Symbol};
assert_eq!(Symbol::undefined("f").binding, Binding::Global);
assert_eq!(Symbol::file("main.c").binding, Binding::Local);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Local
Visible only inside this object.
Global
Visible to every object in the link; two global definitions of one name clash.
Weak
Like global, but yields to a global definition of the same name, and an undefined weak reference resolves to zero instead of failing the link.
Trait Implementations§
impl Copy for Binding
impl Eq for Binding
impl StructuralPartialEq for Binding
Auto Trait Implementations§
impl Freeze for Binding
impl RefUnwindSafe for Binding
impl Send for Binding
impl Sync for Binding
impl Unpin for Binding
impl UnsafeUnpin for Binding
impl UnwindSafe for Binding
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