Enum swc_ecma_ast::TsFnOrConstructorType [−][src]
Variants
TsFnType(TsFnType)
TsConstructorType(TsConstructorType)
Implementations
impl TsFnOrConstructorType
[src]
pub fn is_ts_fn_type(&self) -> bool
[src]
Returns true
if self
is of variant TsFnType
.
pub fn expect_ts_fn_type(self) -> TsFnType where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of TsFnType
.
Panics
Panics if the value is not TsFnType
, with a panic message including the content of self
.
pub fn ts_fn_type(self) -> Option<TsFnType>
[src]
Returns Some
if self
is of variant TsFnType
, and None
otherwise.
pub fn is_ts_constructor_type(&self) -> bool
[src]
Returns true
if self
is of variant TsConstructorType
.
pub fn expect_ts_constructor_type(self) -> TsConstructorType where
Self: Debug,
[src]
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
.
pub fn ts_constructor_type(self) -> Option<TsConstructorType>
[src]
Returns Some
if self
is of variant TsConstructorType
, and None
otherwise.
Trait Implementations
impl Clone for TsFnOrConstructorType
[src]
fn clone(&self) -> TsFnOrConstructorType
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TsFnOrConstructorType
[src]
impl<'de> Deserialize<'de> for TsFnOrConstructorType
[src]
fn deserialize<D>(Deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for TsFnOrConstructorType
[src]
impl EqIgnoreSpan for TsFnOrConstructorType
[src]
fn eq_ignore_span(&self, other: &Self) -> bool
[src]
impl From<TsConstructorType> for TsFnOrConstructorType
[src]
fn from(v: TsConstructorType) -> Self
[src]
impl From<TsFnOrConstructorType> for TsType
[src]
fn from(v: TsFnOrConstructorType) -> Self
[src]
impl From<TsFnType> for TsFnOrConstructorType
[src]
impl Hash for TsFnOrConstructorType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TsFnOrConstructorType> for TsFnOrConstructorType
[src]
fn eq(&self, other: &TsFnOrConstructorType) -> bool
[src]
fn ne(&self, other: &TsFnOrConstructorType) -> bool
[src]
impl Serialize for TsFnOrConstructorType
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Spanned for TsFnOrConstructorType
[src]
impl StructuralEq for TsFnOrConstructorType
[src]
impl StructuralPartialEq for TsFnOrConstructorType
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,