FunctionType

Struct FunctionType 

Source
pub struct FunctionType<'c> { /* private fields */ }
Expand description

A function type.

Implementations§

Source§

impl<'c> FunctionType<'c>

Source

pub fn new( context: &'c Context, inputs: &[Type<'c>], results: &[Type<'c>], ) -> Self

Creates a function type.

Source

pub fn input(&self, index: usize) -> Result<Type<'c>, Error>

Returns an input at a position.

Source

pub fn result(&self, index: usize) -> Result<Type<'c>, Error>

Returns a result at a position.

Source

pub fn input_count(&self) -> usize

Returns a number of inputs.

Source

pub fn result_count(&self) -> usize

Returns a number of results.

Trait Implementations§

Source§

impl<'c> Clone for FunctionType<'c>

Source§

fn clone(&self) -> FunctionType<'c>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'c> Debug for FunctionType<'c>

Source§

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

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

impl<'c> Display for FunctionType<'c>

Source§

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

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

impl<'c> From<FunctionType<'c>> for Type<'c>

Source§

fn from(value: FunctionType<'c>) -> Self

Converts to this type from the input type.
Source§

impl<'c> Hash for FunctionType<'c>

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<'c> TryFrom<Type<'c>> for FunctionType<'c>

Source§

type Error = Error

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

fn try_from(type: Type<'c>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'c> TypeLike<'c> for FunctionType<'c>

Source§

fn to_raw(&self) -> MlirType

Converts a type into a raw object.
Source§

fn context(&self) -> ContextRef<'c>

Returns a context.
Source§

fn id(&self) -> TypeId<'c>

Returns an ID.
Source§

fn dialect(&self) -> Dialect<'c>

Returns a dialect.
Source§

fn dump(&self)

Dumps a type.
Source§

fn is_any_quantized_type(&self) -> bool

Returns true if a type is any quantized type.
Source§

fn is_bf16(&self) -> bool

Returns true if a type is bf16.
Source§

fn is_calibrated_quantized_type(&self) -> bool

Returns true if a type is calibrated quantized type.
Source§

fn is_complex(&self) -> bool

Returns true if a type is complex.
Source§

fn is_f16(&self) -> bool

Returns true if a type is f16.
Source§

fn is_f32(&self) -> bool

Returns true if a type is f32.
Source§

fn is_f64(&self) -> bool

Returns true if a type is f64.
Source§

fn is_float(&self) -> bool

Returns true if a type is float.
Source§

fn is_float_4_e_2_m_1_fn(&self) -> bool

Returns true if a type is float 4 e 2 m 1 fn.
Source§

fn is_float_6_e_2_m_3_fn(&self) -> bool

Returns true if a type is float 6 e 2 m 3 fn.
Source§

fn is_float_6_e_3_m_2_fn(&self) -> bool

Returns true if a type is float 6 e 3 m 2 fn.
Source§

fn is_float8e3m4(&self) -> bool

Returns true if a type is float8e3m4.
Source§

fn is_float8e4m3(&self) -> bool

Returns true if a type is float8e4m3.
Source§

fn is_float8e4m3_b_11_fnuz(&self) -> bool

Returns true if a type is float8e4m3 b 11 fnuz.
Source§

fn is_float8e4m3fn(&self) -> bool

Returns true if a type is float8e4m3fn.
Source§

fn is_float8e4m3fnuz(&self) -> bool

Returns true if a type is float8e4m3fnuz.
Source§

fn is_float8e5m2(&self) -> bool

Returns true if a type is float8e5m2.
Source§

fn is_float8e5m2fnuz(&self) -> bool

Returns true if a type is float8e5m2fnuz.
Source§

fn is_float8e8m0fnu(&self) -> bool

Returns true if a type is float8e8m0fnu.
Source§

fn is_function(&self) -> bool

Returns true if a type is function.
Source§

fn is_gpu_async_token_type(&self) -> bool

Returns true if a type is gpu async token type.
Source§

fn is_index(&self) -> bool

Returns true if a type is index.
Source§

fn is_integer(&self) -> bool

Returns true if a type is integer.
Source§

fn is_llvm_pointer_type(&self) -> bool

Returns true if a type is llvm pointer type.
Source§

fn is_llvm_struct_type(&self) -> bool

Returns true if a type is llvm struct type.
Source§

fn is_mem_ref(&self) -> bool

Returns true if a type is mem ref.
Source§

fn is_none(&self) -> bool

Returns true if a type is none.
Source§

fn is_nvgpu_tensor_map_descriptor_type(&self) -> bool

Returns true if a type is nvgpu tensor map descriptor type.
Source§

fn is_opaque(&self) -> bool

Returns true if a type is opaque.
Source§

fn is_pdl_attribute_type(&self) -> bool

Returns true if a type is pdl attribute type.
Source§

fn is_pdl_operation_type(&self) -> bool

Returns true if a type is pdl operation type.
Source§

fn is_pdl_range_type(&self) -> bool

Returns true if a type is pdl range type.
Source§

fn is_pdl_type(&self) -> bool

Returns true if a type is pdl type.
Source§

fn is_pdl_type_type(&self) -> bool

Returns true if a type is pdl type type.
Source§

fn is_pdl_value_type(&self) -> bool

Returns true if a type is pdl value type.
Source§

fn is_quantized_type(&self) -> bool

Returns true if a type is quantized type.
Source§

fn is_ranked_tensor(&self) -> bool

Returns true if a type is ranked tensor.
Source§

fn is_shaped(&self) -> bool

Returns true if a type is shaped.
Source§

fn is_tensor(&self) -> bool

Returns true if a type is tensor.
Source§

fn is_tf32(&self) -> bool

Returns true if a type is tf32.
Source§

fn is_transform_any_op_type(&self) -> bool

Returns true if a type is transform any op type.
Source§

fn is_transform_any_param_type(&self) -> bool

Returns true if a type is transform any param type.
Source§

fn is_transform_any_value_type(&self) -> bool

Returns true if a type is transform any value type.
Source§

fn is_transform_operation_type(&self) -> bool

Returns true if a type is transform operation type.
Source§

fn is_transform_param_type(&self) -> bool

Returns true if a type is transform param type.
Source§

fn is_tuple(&self) -> bool

Returns true if a type is tuple.
Source§

fn is_uniform_quantized_per_axis_type(&self) -> bool

Returns true if a type is uniform quantized per axis type.
Source§

fn is_uniform_quantized_type(&self) -> bool

Returns true if a type is uniform quantized type.
Source§

fn is_unranked_mem_ref(&self) -> bool

Returns true if a type is unranked mem ref.
Source§

fn is_unranked_tensor(&self) -> bool

Returns true if a type is unranked tensor.
Source§

fn is_vector(&self) -> bool

Returns true if a type is vector.
Source§

impl<'c> Copy for FunctionType<'c>

Auto Trait Implementations§

§

impl<'c> Freeze for FunctionType<'c>

§

impl<'c> RefUnwindSafe for FunctionType<'c>

§

impl<'c> !Send for FunctionType<'c>

§

impl<'c> !Sync for FunctionType<'c>

§

impl<'c> Unpin for FunctionType<'c>

§

impl<'c> UnwindSafe for FunctionType<'c>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

Source§

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>,

Source§

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>,

Source§

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.