pub struct VoidType<'ctx> { /* private fields */ }
Expand description

A VoidType is a special type with no possible direct instances. It’s only useful as a function return type.

Implementations

Gets whether or not this VoidType is sized or not. This may always be false and as such this function may be removed in the future.

Example
use inkwell::context::Context;

let context = Context::create();
let void_type = context.void_type();

assert!(void_type.is_sized());

Gets a reference to the Context this VoidType was created in.

Example
use inkwell::context::Context;

let context = Context::create();
let void_type = context.void_type();

assert_eq!(*void_type.get_context(), context);

Creates a FunctionType with this VoidType for its return type. This means the function does not return.

Example
use inkwell::context::Context;

let context = Context::create();
let void_type = context.void_type();
let fn_type = void_type.fn_type(&[], false);

Print the definition of a VoidType to LLVMString.

Trait Implementations

Returns an AnyTypeEnum that represents the current type.

Prints the definition of a Type to a LLVMString.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

The type returned in the event of a conversion error.

Performs the conversion.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

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.