pub enum TsUnionOrIntersectionType {
TsUnionType(TsUnionType),
TsIntersectionType(TsIntersectionType),
}
Variants
TsUnionType(TsUnionType)
TsIntersectionType(TsIntersectionType)
Implementations
sourceimpl TsUnionOrIntersectionType
impl TsUnionOrIntersectionType
sourcepub fn is_ts_union_type(&self) -> bool
pub fn is_ts_union_type(&self) -> bool
Returns true
if self
is of variant TsUnionType
.
sourcepub fn as_ts_union_type(&self) -> Option<&TsUnionType>
pub fn as_ts_union_type(&self) -> Option<&TsUnionType>
Returns Some
if self
is a reference of variant TsUnionType
, and None
otherwise.
sourcepub fn as_mut_ts_union_type(&mut self) -> Option<&mut TsUnionType>
pub fn as_mut_ts_union_type(&mut self) -> Option<&mut TsUnionType>
Returns Some
if self
is a mutable reference of variant TsUnionType
, and None
otherwise.
sourcepub fn expect_ts_union_type(self) -> TsUnionTypewhere
Self: Debug,
pub fn expect_ts_union_type(self) -> TsUnionTypewhere
Self: Debug,
Unwraps the value, yielding the content of TsUnionType
.
Panics
Panics if the value is not TsUnionType
, with a panic message including the content of self
.
sourcepub fn ts_union_type(self) -> Option<TsUnionType>
pub fn ts_union_type(self) -> Option<TsUnionType>
Returns Some
if self
is of variant TsUnionType
, and None
otherwise.
sourcepub fn is_ts_intersection_type(&self) -> bool
pub fn is_ts_intersection_type(&self) -> bool
Returns true
if self
is of variant TsIntersectionType
.
sourcepub fn as_ts_intersection_type(&self) -> Option<&TsIntersectionType>
pub fn as_ts_intersection_type(&self) -> Option<&TsIntersectionType>
Returns Some
if self
is a reference of variant TsIntersectionType
, and None
otherwise.
sourcepub fn as_mut_ts_intersection_type(&mut self) -> Option<&mut TsIntersectionType>
pub fn as_mut_ts_intersection_type(&mut self) -> Option<&mut TsIntersectionType>
Returns Some
if self
is a mutable reference of variant TsIntersectionType
, and None
otherwise.
sourcepub fn expect_ts_intersection_type(self) -> TsIntersectionTypewhere
Self: Debug,
pub fn expect_ts_intersection_type(self) -> TsIntersectionTypewhere
Self: Debug,
Unwraps the value, yielding the content of TsIntersectionType
.
Panics
Panics if the value is not TsIntersectionType
, with a panic message including the content of self
.
sourcepub fn ts_intersection_type(self) -> Option<TsIntersectionType>
pub fn ts_intersection_type(self) -> Option<TsIntersectionType>
Returns Some
if self
is of variant TsIntersectionType
, and None
otherwise.
Trait Implementations
sourceimpl Clone for TsUnionOrIntersectionType
impl Clone for TsUnionOrIntersectionType
sourcefn clone(&self) -> TsUnionOrIntersectionType
fn clone(&self) -> TsUnionOrIntersectionType
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more