AssignTargetPat

Enum AssignTargetPat 

Source
pub enum AssignTargetPat {
    Array(ArrayPat),
    Object(ObjectPat),
    Invalid(Invalid),
}

Variants§

§

Array(ArrayPat)

§

Object(ObjectPat)

§

Invalid(Invalid)

Implementations§

Source§

impl AssignTargetPat

Source

pub const fn is_array(&self) -> bool

Returns true if self is of variant Array.

Source

pub fn as_array(&self) -> Option<&ArrayPat>

Returns Some if self is a reference of variant Array, and None otherwise.

Source

pub fn as_mut_array(&mut self) -> Option<&mut ArrayPat>

Returns Some if self is a mutable reference of variant Array, and None otherwise.

Source

pub fn expect_array(self) -> ArrayPat

Unwraps the value, yielding the content of Array.

§Panics

Panics if the value is not Array, with a panic message including the content of self.

Source

pub fn array(self) -> Option<ArrayPat>

Returns Some if self is of variant Array, and None otherwise.

Source

pub const fn is_object(&self) -> bool

Returns true if self is of variant Object.

Source

pub fn as_object(&self) -> Option<&ObjectPat>

Returns Some if self is a reference of variant Object, and None otherwise.

Source

pub fn as_mut_object(&mut self) -> Option<&mut ObjectPat>

Returns Some if self is a mutable reference of variant Object, and None otherwise.

Source

pub fn expect_object(self) -> ObjectPat

Unwraps the value, yielding the content of Object.

§Panics

Panics if the value is not Object, with a panic message including the content of self.

Source

pub fn object(self) -> Option<ObjectPat>

Returns Some if self is of variant Object, and None otherwise.

Source

pub const fn is_invalid(&self) -> bool

Returns true if self is of variant Invalid.

Source

pub fn as_invalid(&self) -> Option<&Invalid>

Returns Some if self is a reference of variant Invalid, and None otherwise.

Source

pub fn as_mut_invalid(&mut self) -> Option<&mut Invalid>

Returns Some if self is a mutable reference of variant Invalid, and None otherwise.

Source

pub fn expect_invalid(self) -> Invalid

Unwraps the value, yielding the content of Invalid.

§Panics

Panics if the value is not Invalid, with a panic message including the content of self.

Source

pub fn invalid(self) -> Option<Invalid>

Returns Some if self is of variant Invalid, and None otherwise.

Trait Implementations§

Source§

impl Clone for AssignTargetPat

Source§

fn clone(&self) -> AssignTargetPat

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AssignTargetPat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for AssignTargetPat

Source§

fn default() -> AssignTargetPat

Returns the “default value” for a type. Read more
Source§

impl EqIgnoreSpan for AssignTargetPat

Source§

impl<V> FoldWith<V> for AssignTargetPat
where V: Fold + ?Sized,

Source§

fn fold_with(self, visitor: &mut V) -> AssignTargetPat

Source§

fn fold_children_with(self, visitor: &mut V) -> AssignTargetPat

Visit children nodes of self`` with visitor`.
Source§

impl From<ArrayPat> for AssignTargetPat

Source§

fn from(v: ArrayPat) -> AssignTargetPat

Converts to this type from the input type.
Source§

impl From<AssignTargetPat> for AssignTarget

Source§

fn from(v: AssignTargetPat) -> AssignTarget

Converts to this type from the input type.
Source§

impl From<AssignTargetPat> for Box<Pat>

Source§

fn from(pat: AssignTargetPat) -> Box<Pat>

Converts to this type from the input type.
Source§

impl From<AssignTargetPat> for Pat

Source§

fn from(pat: AssignTargetPat) -> Pat

Converts to this type from the input type.
Source§

impl From<Invalid> for AssignTargetPat

Source§

fn from(v: Invalid) -> AssignTargetPat

Converts to this type from the input type.
Source§

impl From<ObjectPat> for AssignTargetPat

Source§

fn from(v: ObjectPat) -> AssignTargetPat

Converts to this type from the input type.
Source§

impl Hash for AssignTargetPat

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Node for AssignTargetPat

Source§

fn emit_with<W, S>(&self, emitter: &mut Emitter<'_, W, S>) -> Result<(), Error>

Source§

impl PartialEq for AssignTargetPat

Source§

fn eq(&self, other: &AssignTargetPat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Spanned for AssignTargetPat

Source§

fn span(&self) -> Span

Get span of self.
Source§

fn span_lo(&self) -> BytePos

Source§

fn span_hi(&self) -> BytePos

Source§

impl StartsWithAlphaNum for AssignTargetPat

Source§

impl Take for AssignTargetPat

Source§

fn dummy() -> AssignTargetPat

Create a dummy value of this type.
Source§

fn take(&mut self) -> Self

Source§

fn map_with_mut<F>(&mut self, op: F)
where F: FnOnce(Self) -> Self,

Mutate self using op, which accepts owned data.
Source§

impl TryFrom<Pat> for AssignTargetPat

Source§

type Error = Pat

The type returned in the event of a conversion error.
Source§

fn try_from( p: Pat, ) -> Result<AssignTargetPat, <AssignTargetPat as TryFrom<Pat>>::Error>

Performs the conversion.
Source§

impl<V> VisitMutWith<V> for AssignTargetPat
where V: VisitMut + ?Sized,

Source§

fn visit_mut_with(&mut self, visitor: &mut V)

Source§

fn visit_mut_children_with(&mut self, visitor: &mut V)

Visit children nodes of self`` with visitor`.
Source§

impl<V> VisitWith<V> for AssignTargetPat
where V: Visit + ?Sized,

Source§

fn visit_with(&self, visitor: &mut V)

Source§

fn visit_children_with(&self, visitor: &mut V)

Visit children nodes of self`` with visitor`.
Source§

impl Eq for AssignTargetPat

Source§

impl StructuralPartialEq for AssignTargetPat

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> ImplicitClone for T
where T: Clone,

Source§

fn clone_quote_var(&self) -> Self

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> SpanExt for T
where T: Spanned,

Source§

fn is_synthesized(&self) -> bool

Source§

fn starts_on_new_line(&self, format: ListFormat) -> bool

Source§

fn comment_range(&self) -> Span

Gets a custom text range to use when emitting comments.
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Send for T
where T: ?Sized,

Source§

impl<T> Sync for T
where T: ?Sized,