pub enum InstanceofPattern {
Type(Type),
Pattern(Pattern),
}Expand description
The right-hand side of an instanceof expression.
Variants§
Type(Type)
Simple type check: obj instanceof String
Pattern(Pattern)
Pattern matching: obj instanceof String s
Trait Implementations§
Source§impl Clone for InstanceofPattern
impl Clone for InstanceofPattern
Source§fn clone(&self) -> InstanceofPattern
fn clone(&self) -> InstanceofPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstanceofPattern
impl Debug for InstanceofPattern
impl Eq for InstanceofPattern
Source§impl Hash for InstanceofPattern
impl Hash for InstanceofPattern
Source§impl PartialEq for InstanceofPattern
impl PartialEq for InstanceofPattern
Source§fn eq(&self, other: &InstanceofPattern) -> bool
fn eq(&self, other: &InstanceofPattern) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InstanceofPattern
Auto Trait Implementations§
impl Freeze for InstanceofPattern
impl RefUnwindSafe for InstanceofPattern
impl Send for InstanceofPattern
impl Sync for InstanceofPattern
impl Unpin for InstanceofPattern
impl UnsafeUnpin for InstanceofPattern
impl UnwindSafe for InstanceofPattern
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