Enum Linkage

Source
pub enum Linkage {
    External = 0,
    AvailableExternally = 1,
    LinkOnceAny = 2,
    LinkOnceODR = 3,
    WeakAny = 5,
    WeakODR = 6,
    Appending = 7,
    Internal = 8,
    Private = 9,
    ExternalWeak = 12,
    Common = 14,
}
Expand description

A renamed LLVMLinkage

Some deprecated values have been removed, see LLVMLinkage

Variants§

§

External = 0

The default, externally visible linkage type

§

AvailableExternally = 1

Globals will not be emitted to the object file and definitions will be used for optimization purposes, allowing inlining and discarding

§

LinkOnceAny = 2

Globals are merged with other globals of the same name during linkage and unused globals are discarded

§

LinkOnceODR = 3

Similar to LinkOnceAny, but it allows further optimizations by ensuring that only globals with equivalent definitions are merged

§

WeakAny = 5

Similar to LinkOnceAny, but unused globals are not discarded

§

WeakODR = 6

Similar to LinkOnceODR, but unused globals are not discarded

§

Appending = 7

Global arrays are appended together when linkage occurs

§

Internal = 8

Similar to Private, but values are represented as local symbols

§

Private = 9

Globals are only directly accessible by objects in the current module

§

ExternalWeak = 12

The symbol is Weak until linked, otherwise it becomes null instead of undefined

§

Common = 14

Used for tentative definitions at global scope, similar to Weak

Implementations§

Source§

impl Linkage

Source

pub fn inner(&self) -> LLVMLinkage

The LLVMLinkage this value represents

Trait Implementations§

Source§

impl Clone for Linkage

Source§

fn clone(&self) -> Linkage

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Linkage

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Linkage

Source§

fn eq(&self, other: &Linkage) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Linkage

Source§

impl Eq for Linkage

Source§

impl StructuralPartialEq for Linkage

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.