pub enum TsFnOrConstructorType {
TsFnType(TsFnType),
TsConstructorType(TsConstructorType),
}
Variants
TsFnType(TsFnType)
TsConstructorType(TsConstructorType)
Implementations
sourceimpl TsFnOrConstructorType
impl TsFnOrConstructorType
sourcepub fn is_ts_fn_type(&self) -> bool
pub fn is_ts_fn_type(&self) -> bool
Returns true
if self
is of variant TsFnType
.
sourcepub fn as_ts_fn_type(&self) -> Option<&TsFnType>
pub fn as_ts_fn_type(&self) -> Option<&TsFnType>
Returns Some
if self
is a reference of variant TsFnType
, and None
otherwise.
sourcepub fn as_mut_ts_fn_type(&mut self) -> Option<&mut TsFnType>
pub fn as_mut_ts_fn_type(&mut self) -> Option<&mut TsFnType>
Returns Some
if self
is a mutable reference of variant TsFnType
, and None
otherwise.
sourcepub fn expect_ts_fn_type(self) -> TsFnTypewhere
Self: Debug,
pub fn expect_ts_fn_type(self) -> TsFnTypewhere
Self: Debug,
sourcepub fn ts_fn_type(self) -> Option<TsFnType>
pub fn ts_fn_type(self) -> Option<TsFnType>
Returns Some
if self
is of variant TsFnType
, and None
otherwise.
sourcepub fn is_ts_constructor_type(&self) -> bool
pub fn is_ts_constructor_type(&self) -> bool
Returns true
if self
is of variant TsConstructorType
.
sourcepub fn as_ts_constructor_type(&self) -> Option<&TsConstructorType>
pub fn as_ts_constructor_type(&self) -> Option<&TsConstructorType>
Returns Some
if self
is a reference of variant TsConstructorType
, and None
otherwise.
sourcepub fn as_mut_ts_constructor_type(&mut self) -> Option<&mut TsConstructorType>
pub fn as_mut_ts_constructor_type(&mut self) -> Option<&mut TsConstructorType>
Returns Some
if self
is a mutable reference of variant TsConstructorType
, and None
otherwise.
sourcepub fn expect_ts_constructor_type(self) -> TsConstructorTypewhere
Self: Debug,
pub fn expect_ts_constructor_type(self) -> TsConstructorTypewhere
Self: Debug,
Unwraps the value, yielding the content of TsConstructorType
.
Panics
Panics if the value is not TsConstructorType
, with a panic message including the content of self
.
sourcepub fn ts_constructor_type(self) -> Option<TsConstructorType>
pub fn ts_constructor_type(self) -> Option<TsConstructorType>
Returns Some
if self
is of variant TsConstructorType
, and None
otherwise.
Trait Implementations
sourceimpl Clone for TsFnOrConstructorType
impl Clone for TsFnOrConstructorType
sourcefn clone(&self) -> TsFnOrConstructorType
fn clone(&self) -> TsFnOrConstructorType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TsFnOrConstructorType
impl Debug for TsFnOrConstructorType
sourceimpl<'de> Deserialize<'de> for TsFnOrConstructorType
impl<'de> Deserialize<'de> for TsFnOrConstructorType
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl EqIgnoreSpan for TsFnOrConstructorType
impl EqIgnoreSpan for TsFnOrConstructorType
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<TsConstructorType> for TsFnOrConstructorType
impl From<TsConstructorType> for TsFnOrConstructorType
sourcefn from(v: TsConstructorType) -> Self
fn from(v: TsConstructorType) -> Self
Converts to this type from the input type.
sourceimpl From<TsFnOrConstructorType> for TsType
impl From<TsFnOrConstructorType> for TsType
sourcefn from(v: TsFnOrConstructorType) -> Self
fn from(v: TsFnOrConstructorType) -> Self
Converts to this type from the input type.
sourceimpl From<TsFnType> for TsFnOrConstructorType
impl From<TsFnType> for TsFnOrConstructorType
sourceimpl Hash for TsFnOrConstructorType
impl Hash for TsFnOrConstructorType
sourceimpl PartialEq<TsFnOrConstructorType> for TsFnOrConstructorType
impl PartialEq<TsFnOrConstructorType> for TsFnOrConstructorType
sourcefn eq(&self, other: &TsFnOrConstructorType) -> bool
fn eq(&self, other: &TsFnOrConstructorType) -> bool
sourceimpl Serialize for TsFnOrConstructorType
impl Serialize for TsFnOrConstructorType
sourceimpl Spanned for TsFnOrConstructorType
impl Spanned for TsFnOrConstructorType
impl Eq for TsFnOrConstructorType
impl StructuralEq for TsFnOrConstructorType
impl StructuralPartialEq for TsFnOrConstructorType
Auto Trait Implementations
impl RefUnwindSafe for TsFnOrConstructorType
impl Send for TsFnOrConstructorType
impl Sync for TsFnOrConstructorType
impl Unpin for TsFnOrConstructorType
impl UnwindSafe for TsFnOrConstructorType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more