pub struct TypeBuilder { /* private fields */ }

Implementations§

source§

impl TypeBuilder

source

pub fn new(t: &Type) -> Self

source

pub fn finalize(&self) -> Ref<Type>

source

pub fn set_can_return<T: Into<Conf<bool>>>(&self, value: T) -> &Self

source

pub fn set_pure<T: Into<Conf<bool>>>(&self, value: T) -> &Self

source

pub fn set_const<T: Into<Conf<bool>>>(&self, value: T) -> &Self

source

pub fn set_volatile<T: Into<Conf<bool>>>(&self, value: T) -> &Self

source

pub fn type_class(&self) -> TypeClass

source

pub fn width(&self) -> u64

source

pub fn alignment(&self) -> usize

source

pub fn is_signed(&self) -> Conf<bool>

source

pub fn is_const(&self) -> Conf<bool>

source

pub fn is_volatile(&self) -> Conf<bool>

source

pub fn is_floating_point(&self) -> bool

source

pub fn target(&self) -> Result<Conf<Ref<Type>>>

source

pub fn element_type(&self) -> Result<Conf<Ref<Type>>>

source

pub fn return_value(&self) -> Result<Conf<Ref<Type>>>

source

pub fn calling_convention( &self ) -> Result<Conf<Ref<CallingConvention<CoreArchitecture>>>>

source

pub fn parameters(&self) -> Result<Vec<FunctionParameter>>

source

pub fn has_variable_arguments(&self) -> Conf<bool>

source

pub fn can_return(&self) -> Conf<bool>

source

pub fn pure(&self) -> Conf<bool>

source

pub fn get_structure(&self) -> Result<Ref<Structure>>

source

pub fn get_enumeration(&self) -> Result<Ref<Enumeration>>

source

pub fn get_named_type_reference(&self) -> Result<Ref<NamedTypeReference>>

source

pub fn count(&self) -> u64

source

pub fn offset(&self) -> u64

source

pub fn stack_adjustment(&self) -> Conf<i64>

source

pub fn void() -> Self

source

pub fn bool() -> Self

source

pub fn char() -> Self

source

pub fn int(width: usize, is_signed: bool) -> Self

source

pub fn named_int<S: BnStrCompatible>( width: usize, is_signed: bool, alt_name: S ) -> Self

source

pub fn float(width: usize) -> Self

source

pub fn named_float<S: BnStrCompatible>(width: usize, alt_name: S) -> Self

source

pub fn array<'a, T: Into<Conf<&'a Type>>>(t: T, count: u64) -> Self

source

pub fn enumeration<T: Into<Conf<bool>>>( enumeration: &Enumeration, width: usize, is_signed: T ) -> Self

The C/C++ APIs require an associated architecture, but in the core we only query the default_int_size if the given width is 0 For simplicity’s sake, that convention isn’t followed and you can query the default_int_size from an arch, if you have it, if you need to

source

pub fn structure(structure_type: &Structure) -> Self

source

pub fn named_type(type_reference: NamedTypeReference) -> Self

source

pub fn named_type_from_type<S: BnStrCompatible>(name: S, t: &Type) -> Self

source

pub fn pointer<'a, A: Architecture, T: Into<Conf<&'a Type>>>( arch: &A, t: T ) -> Self

source

pub fn const_pointer<'a, A: Architecture, T: Into<Conf<&'a Type>>>( arch: &A, t: T ) -> Self

source

pub fn pointer_of_width<'a, T: Into<Conf<&'a Type>>>( t: T, size: usize, is_const: bool, is_volatile: bool, ref_type: Option<ReferenceType> ) -> Self

source

pub fn pointer_with_options<'a, A: Architecture, T: Into<Conf<&'a Type>>>( arch: &A, t: T, is_const: bool, is_volatile: bool, ref_type: Option<ReferenceType> ) -> Self

Trait Implementations§

source§

impl Display for TypeBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for TypeBuilder

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Hash for TypeBuilder

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for TypeBuilder

source§

fn eq(&self, other: &TypeBuilder) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for TypeBuilder

source§

impl StructuralPartialEq for TypeBuilder

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.