Enum amplify_syn::TypeClass[][src]

pub enum TypeClass {
Show 15 variants Array, BareFn, Group, ImplTrait, Infer, Macro, Never, Paren, Path, Ptr, Reference, Slice, TraitObject, Tuple, Verbatim,
}
Expand description

Constrains for the possible types that a Rust value could have.

Variants

Array

A fixed size array type: [T; n].

BareFn

A bare function type: fn(usize) -> bool.

Group

A type contained within invisible delimiters.

ImplTrait

An impl Bound1 + Bound2 + Bound3 type where Bound is a trait or a lifetime.

Infer

Indication that a type should be inferred by the compiler: _.

Macro

A macro in the type position.

Never

The never type: !.

Paren

A parenthesized type equivalent to the inner type.

Path

A path like std::slice::Iter, optionally qualified with a self-type as in <Vec<T> as SomeTrait>::Associated.

Ptr

A raw pointer type: *const T or *mut T.

Reference

A reference type: &'a T or &'a mut T.

Slice

A dynamically sized slice type: [T].

TraitObject

A trait object type Bound1 + Bound2 + Bound3 where Bound is a trait or a lifetime.

Tuple

A tuple type: (A, B, C, String).

Verbatim

Tokens in type position not interpreted by Syn.

Implementations

Checks the Type against current requirements, generating Error if the requirements are not met.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.