pub enum Type {
Int(BigUint),
UInt(BigUint),
Bool,
Tuple(Vec<Type>),
Struct(Vec<(String, Type)>),
Array {
inner: Box<Type>,
length: BigUint,
},
Memory {
inner: Box<Type>,
length: BigUint,
},
Enum(Vec<Vec<Type>>),
Backward(Box<Type>),
InOut(Box<Type>),
}Variants§
Int(BigUint)
UInt(BigUint)
Bool
Tuple(Vec<Type>)
Struct(Vec<(String, Type)>)
Array
Memory
Enum(Vec<Vec<Type>>)
Backward(Box<Type>)
A type in which values flow the opposite way compared to normal types. When a type
containing a Backward
InOut(Box<Type>)
Implementations§
Source§impl Type
impl Type
pub fn int(val: u32) -> Self
pub fn uint(val: u32) -> Self
pub fn backward(inner: Type) -> Self
pub fn unit() -> Self
pub fn size(&self) -> BigUint
pub fn backward_size(&self) -> BigUint
pub fn assume_enum(&self) -> &Vec<Vec<Type>>
pub fn must_use(&self) -> bool
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more