Struct llvm_rs::types::StructType

source ·
pub struct StructType(_);
Expand description

A structure type, such as a tuple or struct.

Implementations§

Make a new struct with the given fields and packed representation.

Make a new named struct with the given fields and packed representation.

Make a new named struct without defining its fields yet.

You can use this opaque struct without defining its fields (for creating recursive types, etc.). When you want to define its fields (which may include itself), use set_elements().

Set the elements that make up this struct.

Can only be called once, and only on a StructType created through the new_opaque() function. Returns Err(()) if the struct is not opaque.

Returns the elements that make up this struct.

Methods from Deref<Target = Type>§

Returns true if the size of the type is known at compile-time.

This is equivalent to the type implementing Sized in Rust

Returns true if this type is a function.

This is equivalent to FunctionType::is.

Returns true if this type is a struct.

This is equivalent to StructType::is.

Returns true if this type is void.

Returns true if this type is a pointer.

This is equivalent to PointerType::is.

Returns true if this type is an integer.

Returns true if this type is any floating-point number.

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
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.
Returns a reference to the context that owns this value. 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
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
Check if the given super value is an instance of this type.
Attempt to cast the given super value into an instance of this type.
Cast this value to a super value.

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.