pub enum TsUnionOrIntersectionType {
TsUnionType(TsUnionType),
TsIntersectionType(TsIntersectionType),
}
Variants§
TsUnionType(TsUnionType)
TsIntersectionType(TsIntersectionType)
Implementations§
source§impl TsUnionOrIntersectionType
impl TsUnionOrIntersectionType
sourcepub const fn is_ts_union_type(&self) -> bool
pub const 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 const fn is_ts_intersection_type(&self) -> bool
pub const 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§
source§impl<'arbitrary> Arbitrary<'arbitrary> for TsUnionOrIntersectionType
impl<'arbitrary> Arbitrary<'arbitrary> for TsUnionOrIntersectionType
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read moresource§impl Archive for TsUnionOrIntersectionType
impl Archive for TsUnionOrIntersectionType
source§impl Clone for TsUnionOrIntersectionType
impl Clone for TsUnionOrIntersectionType
source§fn clone(&self) -> TsUnionOrIntersectionType
fn clone(&self) -> TsUnionOrIntersectionType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TsUnionOrIntersectionType
impl Debug for TsUnionOrIntersectionType
source§impl<'de> Deserialize<'de> for TsUnionOrIntersectionType
impl<'de> Deserialize<'de> for TsUnionOrIntersectionType
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<__D> Deserialize<TsUnionOrIntersectionType, __D> for Archived<TsUnionOrIntersectionType>
impl<__D> Deserialize<TsUnionOrIntersectionType, __D> for Archived<TsUnionOrIntersectionType>
source§fn deserialize(
&self,
deserializer: &mut __D
) -> Result<TsUnionOrIntersectionType, __D::Error>
fn deserialize( &self, deserializer: &mut __D ) -> Result<TsUnionOrIntersectionType, __D::Error>
source§impl EqIgnoreSpan for TsUnionOrIntersectionType
impl EqIgnoreSpan for TsUnionOrIntersectionType
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<TsIntersectionType> for TsUnionOrIntersectionType
impl From<TsIntersectionType> for TsUnionOrIntersectionType
source§fn from(v: TsIntersectionType) -> Self
fn from(v: TsIntersectionType) -> Self
source§impl From<TsUnionOrIntersectionType> for TsType
impl From<TsUnionOrIntersectionType> for TsType
source§fn from(v: TsUnionOrIntersectionType) -> Self
fn from(v: TsUnionOrIntersectionType) -> Self
source§impl From<TsUnionType> for TsUnionOrIntersectionType
impl From<TsUnionType> for TsUnionOrIntersectionType
source§fn from(v: TsUnionType) -> Self
fn from(v: TsUnionType) -> Self
source§impl Hash for TsUnionOrIntersectionType
impl Hash for TsUnionOrIntersectionType
source§impl PartialEq for TsUnionOrIntersectionType
impl PartialEq for TsUnionOrIntersectionType
source§fn eq(&self, other: &TsUnionOrIntersectionType) -> bool
fn eq(&self, other: &TsUnionOrIntersectionType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<__S> Serialize<__S> for TsUnionOrIntersectionType
impl<__S> Serialize<__S> for TsUnionOrIntersectionType
source§impl Spanned for TsUnionOrIntersectionType
impl Spanned for TsUnionOrIntersectionType
impl Eq for TsUnionOrIntersectionType
impl StructuralPartialEq for TsUnionOrIntersectionType
Auto Trait Implementations§
impl RefUnwindSafe for TsUnionOrIntersectionType
impl Send for TsUnionOrIntersectionType
impl Sync for TsUnionOrIntersectionType
impl Unpin for TsUnionOrIntersectionType
impl UnwindSafe for TsUnionOrIntersectionType
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive
, it may be unsized. Read more