pub struct MemoryBuffer { /* private fields */ }

Implementations§

This function is likely slightly cheaper than create_from_memory_range_copy since it intentionally leaks data to LLVM so that it doesn’t have to reallocate. create_from_memory_range_copy may be removed in the future

This will create a new MemoryBuffer from the given input.

This function is likely slightly more expensive than create_from_memory_range since it does not leak data to LLVM, forcing LLVM to make a copy. This function may be removed in the future in favor of create_from_memory_range

Gets a byte slice of this MemoryBuffer.

Gets the byte size of this MemoryBuffer.

Convert this MemoryBuffer into an ObjectFile. LLVM does not currently provide any way to determine the cause of error if conversion fails.

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. 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.