pub enum PerlType {
Scalar(ScalarType),
Array(Box<PerlType>),
Hash {
key: Box<PerlType>,
value: Box<PerlType>,
},
Reference(Box<PerlType>),
Subroutine {
params: Vec<PerlType>,
returns: Vec<PerlType>,
},
Object(String),
Glob,
Union(Vec<PerlType>),
Any,
Void,
}Expand description
Type inference types: Perl types, constraints, and inference engine. Represents a Perl type
Variants§
Scalar(ScalarType)
Scalar types
Array(Box<PerlType>)
Array type
Hash
Hash type with key and value types
Fields
Reference(Box<PerlType>)
Reference to another type
Subroutine
Subroutine type with parameter and return types
Fields
Object(String)
Object type with class name
Glob
Glob/typeglob type
Union(Vec<PerlType>)
Union of multiple possible types
Any
Unknown or any type
Void
Void/no return value
Trait Implementations§
impl Eq for PerlType
impl StructuralPartialEq for PerlType
Auto Trait Implementations§
impl Freeze for PerlType
impl RefUnwindSafe for PerlType
impl Send for PerlType
impl Sync for PerlType
impl Unpin for PerlType
impl UnsafeUnpin for PerlType
impl UnwindSafe for PerlType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.