Enum leo_ast::types::type_::Type[][src]

pub enum Type {
    Address,
    Boolean,
    Field,
    Group,
    IntegerType(IntegerType),
    Array(Box<Type>, ArrayDimensions),
    Tuple(Vec<Type>),
    Circuit(Identifier),
    SelfType,
}

Explicit type used for defining a variable or expression type

Variants

Address
Boolean
Field
Group
IntegerType(IntegerType)
Tuple(Vec<Type>)
Circuit(Identifier)
SelfType

Implementations

impl Type[src]

pub fn is_self(&self) -> bool[src]

Returns true if the self Type is the SelfType.

pub fn is_circuit(&self) -> bool[src]

Returns true if the self Type is a Circuit.

pub fn eq_flat(&self, other: &Self) -> bool[src]

Returns true if the self Type is equal to the other Type.

Flattens array syntax: [[u8; 1]; 2] == [u8; (2, 1)] == true

Trait Implementations

impl Clone for Type[src]

impl Debug for Type[src]

impl<'de> Deserialize<'de> for Type[src]

impl Display for Type[src]

impl Eq for Type[src]

impl<'ast> From<ArrayType<'ast>> for Type[src]

impl<'ast> From<ArrayType<'ast>> for Type[src]

impl<'ast> From<CircuitType<'ast>> for Type[src]

impl From<DataType> for Type[src]

pest ast -> Explicit Type for defining circuit members and function params

impl From<DataType> for Type[src]

input pest ast -> Explicit Type

impl<'ast> From<TupleType<'ast>> for Type[src]

impl<'ast> From<TupleType<'ast>> for Type[src]

impl<'ast> From<Type<'ast>> for Type[src]

impl<'ast> From<Type<'ast>> for Type[src]

impl Hash for Type[src]

impl PartialEq<Type> for Type[src]

impl Serialize for Type[src]

impl StructuralEq for Type[src]

impl StructuralPartialEq for Type[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.