Struct llvm_rs::Context

source ·
pub struct Context(_);
Expand description

Contains all the LLVM entities - mainly modules.

Every single entity attached to it has its lifetime to enforce the rule that things from different contexts cannot interact and to preserve pointer safety.

Implementations§

Get a reference to the global context.

This is marked as unsafe because this can result in undefined behaviour in a multithreaded context if they all use the same context.

Create a new context, which is owned by the callee block.

Trait Implementations§

What a reference to this type represents as a C pointer.
Destroy the contents at the pointer’s location. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.