#[non_exhaustive]pub struct IfChain {
pub if_token: If,
pub cond: Box<Expr>,
pub then_brace: Brace,
pub then_branch: TemplateBody,
pub else_if_branch: Option<Box<IfChain>>,
pub else_brace: Option<Brace>,
pub else_branch: Option<TemplateBody>,
pub dyn_idx: DynIdx,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.if_token: If
§cond: Box<Expr>
§then_brace: Brace
§then_branch: TemplateBody
§else_if_branch: Option<Box<IfChain>>
§else_brace: Option<Brace>
§else_branch: Option<TemplateBody>
§dyn_idx: DynIdx
Implementations§
Source§impl IfChain
impl IfChain
pub fn for_each_branch(&self, f: &mut impl FnMut(&TemplateBody))
Trait Implementations§
Source§impl ToTokens for IfChain
impl ToTokens for IfChain
Source§fn to_tokens(&self, tokens: &mut TokenStream2)
fn to_tokens(&self, tokens: &mut TokenStream2)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Eq for IfChain
impl StructuralPartialEq for IfChain
Auto Trait Implementations§
impl !Freeze for IfChain
impl !RefUnwindSafe for IfChain
impl !Send for IfChain
impl !Sync for IfChain
impl Unpin for IfChain
impl UnwindSafe for IfChain
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> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.