pub struct ConditionalType<'arena> {
pub subject: &'arena Type<'arena>,
pub is: Keyword<'arena>,
pub not: Option<Keyword<'arena>>,
pub target: &'arena Type<'arena>,
pub question_mark: Span,
pub then: &'arena Type<'arena>,
pub colon: Span,
pub otherwise: &'arena Type<'arena>,
}Fields§
§subject: &'arena Type<'arena>§is: Keyword<'arena>§not: Option<Keyword<'arena>>§target: &'arena Type<'arena>§question_mark: Span§then: &'arena Type<'arena>§colon: Span§otherwise: &'arena Type<'arena>Implementations§
Source§impl ConditionalType<'_>
impl ConditionalType<'_>
pub fn is_negated(&self) -> bool
Trait Implementations§
Source§impl<'arena> Clone for ConditionalType<'arena>
impl<'arena> Clone for ConditionalType<'arena>
Source§fn clone(&self) -> ConditionalType<'arena>
fn clone(&self) -> ConditionalType<'arena>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'arena> Debug for ConditionalType<'arena>
impl<'arena> Debug for ConditionalType<'arena>
Source§impl Display for ConditionalType<'_>
impl Display for ConditionalType<'_>
Source§impl HasSpan for ConditionalType<'_>
impl HasSpan for ConditionalType<'_>
Source§fn start_position(&self) -> Position
fn start_position(&self) -> Position
A convenience method to get the starting position of the span.
Source§fn start_offset(&self) -> u32
fn start_offset(&self) -> u32
A convenience method to get the starting byte offset of the span.
Source§fn end_position(&self) -> Position
fn end_position(&self) -> Position
A convenience method to get the ending position of the span.
Source§fn end_offset(&self) -> u32
fn end_offset(&self) -> u32
A convenience method to get the ending byte offset of the span.
Source§impl<'arena> Hash for ConditionalType<'arena>
impl<'arena> Hash for ConditionalType<'arena>
Source§impl<'arena> Ord for ConditionalType<'arena>
impl<'arena> Ord for ConditionalType<'arena>
Source§fn cmp(&self, other: &ConditionalType<'arena>) -> Ordering
fn cmp(&self, other: &ConditionalType<'arena>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'arena> PartialEq for ConditionalType<'arena>
impl<'arena> PartialEq for ConditionalType<'arena>
Source§impl<'arena> PartialOrd for ConditionalType<'arena>
impl<'arena> PartialOrd for ConditionalType<'arena>
Source§impl<'arena> Serialize for ConditionalType<'arena>
impl<'arena> Serialize for ConditionalType<'arena>
impl<'arena> Eq for ConditionalType<'arena>
impl<'arena> StructuralPartialEq for ConditionalType<'arena>
Auto Trait Implementations§
impl<'arena> Freeze for ConditionalType<'arena>
impl<'arena> !RefUnwindSafe for ConditionalType<'arena>
impl<'arena> !Send for ConditionalType<'arena>
impl<'arena> !Sync for ConditionalType<'arena>
impl<'arena> Unpin for ConditionalType<'arena>
impl<'arena> UnsafeUnpin for ConditionalType<'arena>
impl<'arena> !UnwindSafe for ConditionalType<'arena>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> HasPosition for Twhere
T: HasSpan,
impl<T> HasPosition for Twhere
T: HasSpan,
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>
Converts
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>
Converts
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