pub enum Ty {
}Expand description
A PHP type.
Variants§
Unknown
Type is not known / not yet inferred.
Never
The never return type (function never returns normally).
Void
The void return type.
Null
null.
Bool
bool.
Int
int.
Float
float.
Str
string.
Array
Untyped array.
Callable
callable.
Object(String)
A named object type (fully-qualified or short class/interface name).
Union(Vec<Ty>)
T1|T2|…
Intersection(Vec<Ty>)
T1&T2&…
Implementations§
Source§impl Ty
impl Ty
Sourcepub fn class_name(&self) -> Option<&str>
pub fn class_name(&self) -> Option<&str>
If this is a single named object type, return its class name.
Sourcepub fn is_nullable(&self) -> bool
pub fn is_nullable(&self) -> bool
True if null is a valid value for this type.
Trait Implementations§
impl StructuralPartialEq for Ty
Auto Trait Implementations§
impl Freeze for Ty
impl RefUnwindSafe for Ty
impl Send for Ty
impl Sync for Ty
impl Unpin for Ty
impl UnsafeUnpin for Ty
impl UnwindSafe for Ty
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