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§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read moreSource§impl Archive for TsUnionOrIntersectionType
impl Archive for TsUnionOrIntersectionType
Source§type Archived = ArchivedTsUnionOrIntersectionType
type Archived = ArchivedTsUnionOrIntersectionType
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: Fallible + ?Sized> Deserialize<TsUnionOrIntersectionType, __D> for Archived<TsUnionOrIntersectionType>
impl<__D: Fallible + ?Sized> 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<__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 Freeze for TsUnionOrIntersectionType
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
Source§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,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive
, it may be unsized. Read moreSource§type MetadataResolver = ()
type MetadataResolver = ()
Source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
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
Source§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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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