#[non_exhaustive]pub enum Type<'input> {
Show 67 variants
Parenthesized(ParenthesizedType<'input>),
Union(UnionType<'input>),
Intersection(IntersectionType<'input>),
Nullable(NullableType<'input>),
Array(ArrayType<'input>),
NonEmptyArray(NonEmptyArrayType<'input>),
AssociativeArray(AssociativeArrayType<'input>),
List(ListType<'input>),
NonEmptyList(NonEmptyListType<'input>),
Iterable(IterableType<'input>),
ClassString(ClassStringType<'input>),
InterfaceString(InterfaceStringType<'input>),
EnumString(EnumStringType<'input>),
TraitString(TraitStringType<'input>),
Reference(ReferenceType<'input>),
Mixed(Keyword<'input>),
NonEmptyMixed(Keyword<'input>),
Null(Keyword<'input>),
Void(Keyword<'input>),
Never(Keyword<'input>),
Resource(Keyword<'input>),
ClosedResource(Keyword<'input>),
OpenResource(Keyword<'input>),
True(Keyword<'input>),
False(Keyword<'input>),
Bool(Keyword<'input>),
Float(Keyword<'input>),
Int(Keyword<'input>),
PositiveInt(Keyword<'input>),
NegativeInt(Keyword<'input>),
NonPositiveInt(Keyword<'input>),
NonNegativeInt(Keyword<'input>),
String(Keyword<'input>),
StringableObject(Keyword<'input>),
ArrayKey(Keyword<'input>),
Object(ObjectType<'input>),
Numeric(Keyword<'input>),
Scalar(Keyword<'input>),
NumericString(Keyword<'input>),
NonEmptyString(Keyword<'input>),
NonEmptyLowercaseString(Keyword<'input>),
LowercaseString(Keyword<'input>),
TruthyString(Keyword<'input>),
NonFalsyString(Keyword<'input>),
UnspecifiedLiteralInt(Keyword<'input>),
UnspecifiedLiteralString(Keyword<'input>),
UnspecifiedLiteralFloat(Keyword<'input>),
NonEmptyUnspecifiedLiteralString(Keyword<'input>),
LiteralFloat(LiteralFloatType<'input>),
LiteralInt(LiteralIntType<'input>),
LiteralString(LiteralStringType<'input>),
MemberReference(MemberReferenceType<'input>),
AliasReference(AliasReferenceType<'input>),
Shape(ShapeType<'input>),
Callable(CallableType<'input>),
Variable(VariableType<'input>),
Conditional(ConditionalType<'input>),
KeyOf(KeyOfType<'input>),
ValueOf(ValueOfType<'input>),
IntMask(IntMaskType<'input>),
IntMaskOf(IntMaskOfType<'input>),
IndexAccess(IndexAccessType<'input>),
Negated(NegatedType<'input>),
Posited(PositedType<'input>),
IntRange(IntRangeType<'input>),
PropertiesOf(PropertiesOfType<'input>),
Slice(SliceType<'input>),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Parenthesized(ParenthesizedType<'input>)
Union(UnionType<'input>)
Intersection(IntersectionType<'input>)
Nullable(NullableType<'input>)
Array(ArrayType<'input>)
NonEmptyArray(NonEmptyArrayType<'input>)
AssociativeArray(AssociativeArrayType<'input>)
List(ListType<'input>)
NonEmptyList(NonEmptyListType<'input>)
Iterable(IterableType<'input>)
ClassString(ClassStringType<'input>)
InterfaceString(InterfaceStringType<'input>)
EnumString(EnumStringType<'input>)
TraitString(TraitStringType<'input>)
Reference(ReferenceType<'input>)
Mixed(Keyword<'input>)
NonEmptyMixed(Keyword<'input>)
Null(Keyword<'input>)
Void(Keyword<'input>)
Never(Keyword<'input>)
Resource(Keyword<'input>)
ClosedResource(Keyword<'input>)
OpenResource(Keyword<'input>)
True(Keyword<'input>)
False(Keyword<'input>)
Bool(Keyword<'input>)
Float(Keyword<'input>)
Int(Keyword<'input>)
PositiveInt(Keyword<'input>)
NegativeInt(Keyword<'input>)
NonPositiveInt(Keyword<'input>)
NonNegativeInt(Keyword<'input>)
String(Keyword<'input>)
StringableObject(Keyword<'input>)
ArrayKey(Keyword<'input>)
Object(ObjectType<'input>)
Numeric(Keyword<'input>)
Scalar(Keyword<'input>)
NumericString(Keyword<'input>)
NonEmptyString(Keyword<'input>)
NonEmptyLowercaseString(Keyword<'input>)
LowercaseString(Keyword<'input>)
TruthyString(Keyword<'input>)
NonFalsyString(Keyword<'input>)
UnspecifiedLiteralInt(Keyword<'input>)
UnspecifiedLiteralString(Keyword<'input>)
UnspecifiedLiteralFloat(Keyword<'input>)
NonEmptyUnspecifiedLiteralString(Keyword<'input>)
LiteralFloat(LiteralFloatType<'input>)
LiteralInt(LiteralIntType<'input>)
LiteralString(LiteralStringType<'input>)
MemberReference(MemberReferenceType<'input>)
AliasReference(AliasReferenceType<'input>)
Shape(ShapeType<'input>)
Callable(CallableType<'input>)
Variable(VariableType<'input>)
Conditional(ConditionalType<'input>)
KeyOf(KeyOfType<'input>)
ValueOf(ValueOfType<'input>)
IntMask(IntMaskType<'input>)
IntMaskOf(IntMaskOfType<'input>)
IndexAccess(IndexAccessType<'input>)
Negated(NegatedType<'input>)
Posited(PositedType<'input>)
IntRange(IntRangeType<'input>)
PropertiesOf(PropertiesOfType<'input>)
Slice(SliceType<'input>)
Trait Implementations§
Source§impl HasSpan for Type<'_>
impl HasSpan for Type<'_>
Source§fn start_position(&self) -> Position
fn start_position(&self) -> Position
A convenience method to get the starting position of the span.
Source§fn start_offset(&self) -> u32
fn start_offset(&self) -> u32
A convenience method to get the starting byte offset of the span.
Source§fn end_position(&self) -> Position
fn end_position(&self) -> Position
A convenience method to get the ending position of the span.
Source§fn end_offset(&self) -> u32
fn end_offset(&self) -> u32
A convenience method to get the ending byte offset of the span.
Source§impl<'input> Ord for Type<'input>
impl<'input> Ord for Type<'input>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'input> PartialOrd for Type<'input>
impl<'input> PartialOrd for Type<'input>
impl<'input> Eq for Type<'input>
impl<'input> StructuralPartialEq for Type<'input>
Auto Trait Implementations§
impl<'input> Freeze for Type<'input>
impl<'input> RefUnwindSafe for Type<'input>
impl<'input> Send for Type<'input>
impl<'input> Sync for Type<'input>
impl<'input> Unpin for Type<'input>
impl<'input> UnwindSafe for Type<'input>
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> HasPosition for Twhere
T: HasSpan,
impl<T> HasPosition for Twhere
T: HasSpan,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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