pub enum TsFnParam {
Ident(BindingIdent),
Array(ArrayPat),
Rest(RestPat),
Object(ObjectPat),
}Variants§
Implementations§
source§impl TsFnParam
impl TsFnParam
sourcepub fn as_ident(&self) -> Option<&BindingIdent>
pub fn as_ident(&self) -> Option<&BindingIdent>
Returns Some if self is a reference of variant Ident, and None otherwise.
sourcepub fn as_mut_ident(&mut self) -> Option<&mut BindingIdent>
pub fn as_mut_ident(&mut self) -> Option<&mut BindingIdent>
Returns Some if self is a mutable reference of variant Ident, and None otherwise.
sourcepub fn expect_ident(self) -> BindingIdentwhere
Self: Debug,
pub fn expect_ident(self) -> BindingIdentwhere
Self: Debug,
sourcepub fn ident(self) -> Option<BindingIdent>
pub fn ident(self) -> Option<BindingIdent>
Returns Some if self is of variant Ident, and None otherwise.
sourcepub fn as_array(&self) -> Option<&ArrayPat>
pub fn as_array(&self) -> Option<&ArrayPat>
Returns Some if self is a reference of variant Array, and None otherwise.
sourcepub fn as_mut_array(&mut self) -> Option<&mut ArrayPat>
pub fn as_mut_array(&mut self) -> Option<&mut ArrayPat>
Returns Some if self is a mutable reference of variant Array, and None otherwise.
sourcepub fn expect_array(self) -> ArrayPatwhere
Self: Debug,
pub fn expect_array(self) -> ArrayPatwhere
Self: Debug,
sourcepub fn array(self) -> Option<ArrayPat>
pub fn array(self) -> Option<ArrayPat>
Returns Some if self is of variant Array, and None otherwise.
sourcepub fn as_rest(&self) -> Option<&RestPat>
pub fn as_rest(&self) -> Option<&RestPat>
Returns Some if self is a reference of variant Rest, and None otherwise.
sourcepub fn as_mut_rest(&mut self) -> Option<&mut RestPat>
pub fn as_mut_rest(&mut self) -> Option<&mut RestPat>
Returns Some if self is a mutable reference of variant Rest, and None otherwise.
sourcepub fn expect_rest(self) -> RestPatwhere
Self: Debug,
pub fn expect_rest(self) -> RestPatwhere
Self: Debug,
sourcepub fn rest(self) -> Option<RestPat>
pub fn rest(self) -> Option<RestPat>
Returns Some if self is of variant Rest, and None otherwise.
sourcepub fn as_object(&self) -> Option<&ObjectPat>
pub fn as_object(&self) -> Option<&ObjectPat>
Returns Some if self is a reference of variant Object, and None otherwise.
sourcepub fn as_mut_object(&mut self) -> Option<&mut ObjectPat>
pub fn as_mut_object(&mut self) -> Option<&mut ObjectPat>
Returns Some if self is a mutable reference of variant Object, and None otherwise.
sourcepub fn expect_object(self) -> ObjectPatwhere
Self: Debug,
pub fn expect_object(self) -> ObjectPatwhere
Self: Debug,
Trait Implementations§
source§impl<'de> Deserialize<'de> for TsFnParam
impl<'de> Deserialize<'de> for TsFnParam
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl EqIgnoreSpan for TsFnParam
impl EqIgnoreSpan for TsFnParam
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<BindingIdent> for TsFnParam
impl From<BindingIdent> for TsFnParam
source§fn from(v: BindingIdent) -> Self
fn from(v: BindingIdent) -> Self
impl Eq for TsFnParam
impl StructuralPartialEq for TsFnParam
Auto Trait Implementations§
impl Freeze for TsFnParam
impl RefUnwindSafe for TsFnParam
impl Send for TsFnParam
impl Sync for TsFnParam
impl Unpin for TsFnParam
impl UnwindSafe for TsFnParam
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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>
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>
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