Struct llvm_plugin_inkwell::types::MetadataType
source · [−]pub struct MetadataType<'ctx> { /* private fields */ }Expand description
A MetadataType is the type of a metadata.
Implementations
sourceimpl<'ctx> MetadataType<'ctx>
impl<'ctx> MetadataType<'ctx>
sourcepub fn fn_type(
self,
param_types: &[BasicMetadataTypeEnum<'ctx>],
is_var_args: bool
) -> FunctionType<'ctx>
pub fn fn_type(
self,
param_types: &[BasicMetadataTypeEnum<'ctx>],
is_var_args: bool
) -> FunctionType<'ctx>
Creates a FunctionType with this MetadataType for its return type.
Example
use inkwell::context::Context;
let context = Context::create();
let md_type = context.metadata_type();
let fn_type = md_type.fn_type(&[], false);sourcepub fn get_context(self) -> ContextRef<'ctx>
pub fn get_context(self) -> ContextRef<'ctx>
Gets a reference to the Context this MetadataType was created in.
Example
use inkwell::context::Context;
let context = Context::create();
let md_type = context.metadata_type();
assert_eq!(*md_type.get_context(), context);sourcepub fn print_to_string(self) -> LLVMString
pub fn print_to_string(self) -> LLVMString
Print the definition of a MetadataType to LLVMString.
Trait Implementations
sourceimpl<'ctx> Clone for MetadataType<'ctx>
impl<'ctx> Clone for MetadataType<'ctx>
sourcefn clone(&self) -> MetadataType<'ctx>
fn clone(&self) -> MetadataType<'ctx>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'ctx> Debug for MetadataType<'ctx>
impl<'ctx> Debug for MetadataType<'ctx>
sourceimpl Display for MetadataType<'_>
impl Display for MetadataType<'_>
sourceimpl<'ctx> From<MetadataType<'ctx>> for BasicMetadataTypeEnum<'ctx>
impl<'ctx> From<MetadataType<'ctx>> for BasicMetadataTypeEnum<'ctx>
sourcefn from(value: MetadataType<'_>) -> BasicMetadataTypeEnum<'_>
fn from(value: MetadataType<'_>) -> BasicMetadataTypeEnum<'_>
Converts to this type from the input type.
sourceimpl<'ctx> PartialEq<MetadataType<'ctx>> for MetadataType<'ctx>
impl<'ctx> PartialEq<MetadataType<'ctx>> for MetadataType<'ctx>
sourcefn eq(&self, other: &MetadataType<'ctx>) -> bool
fn eq(&self, other: &MetadataType<'ctx>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourceimpl<'ctx> TryFrom<BasicMetadataTypeEnum<'ctx>> for MetadataType<'ctx>
impl<'ctx> TryFrom<BasicMetadataTypeEnum<'ctx>> for MetadataType<'ctx>
impl<'ctx> Copy for MetadataType<'ctx>
impl<'ctx> Eq for MetadataType<'ctx>
impl<'ctx> StructuralEq for MetadataType<'ctx>
impl<'ctx> StructuralPartialEq for MetadataType<'ctx>
Auto Trait Implementations
impl<'ctx> RefUnwindSafe for MetadataType<'ctx>
impl<'ctx> !Send for MetadataType<'ctx>
impl<'ctx> !Sync for MetadataType<'ctx>
impl<'ctx> Unpin for MetadataType<'ctx>
impl<'ctx> UnwindSafe for MetadataType<'ctx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more