pub enum PhpType {
Scalar(PhpScalarType),
Named(PhpTypeName),
Nullable(Box<PhpType>),
Union(Vec<PhpType>),
Intersection(Vec<PhpType>),
Mixed,
Never,
Void,
Callable,
Iterable,
Object,
}Expand description
PHP type metadata without type-checker behavior.
Variants§
Scalar(PhpScalarType)
Named(PhpTypeName)
Nullable(Box<PhpType>)
Union(Vec<PhpType>)
Intersection(Vec<PhpType>)
Mixed
Never
Void
Callable
Iterable
Object
Implementations§
Source§impl PhpType
impl PhpType
pub const fn scalar(kind: PhpScalarType) -> Self
pub const fn named(name: PhpTypeName) -> Self
pub fn nullable(inner: Self) -> Result<Self, PhpTypeError>
pub fn union(types: Vec<Self>) -> Result<Self, PhpTypeError>
pub fn intersection(types: Vec<Self>) -> Result<Self, PhpTypeError>
pub const fn kind(&self) -> PhpTypeKind
Trait Implementations§
impl Eq for PhpType
impl StructuralPartialEq for PhpType
Auto Trait Implementations§
impl Freeze for PhpType
impl RefUnwindSafe for PhpType
impl Send for PhpType
impl Sync for PhpType
impl Unpin for PhpType
impl UnsafeUnpin for PhpType
impl UnwindSafe for PhpType
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