Enum dprint_swc_ecma_ast_view::Stmt [−][src]
Variants
Block(&'a BlockStmt<'a>)
Empty(&'a EmptyStmt<'a>)
Debugger(&'a DebuggerStmt<'a>)
With(&'a WithStmt<'a>)
Return(&'a ReturnStmt<'a>)
Labeled(&'a LabeledStmt<'a>)
Break(&'a BreakStmt<'a>)
Continue(&'a ContinueStmt<'a>)
If(&'a IfStmt<'a>)
Switch(&'a SwitchStmt<'a>)
Throw(&'a ThrowStmt<'a>)
Try(&'a TryStmt<'a>)
A try statement. If handler is null then finalizer must be a BlockStmt.
While(&'a WhileStmt<'a>)
DoWhile(&'a DoWhileStmt<'a>)
For(&'a ForStmt<'a>)
ForIn(&'a ForInStmt<'a>)
ForOf(&'a ForOfStmt<'a>)
Decl(Decl<'a>)
Expr(&'a ExprStmt<'a>)
Implementations
impl<'a> Stmt<'a>
[src]
pub fn to<T: CastableNode<'a>>(&self) -> Option<&'a T>
[src]
pub fn expect<T: CastableNode<'a>>(&self) -> &'a T
[src]
pub fn is<T: CastableNode<'a>>(&self) -> bool
[src]
Trait Implementations
impl<'a> Clone for Stmt<'a>
[src]
impl<'a> Copy for Stmt<'a>
[src]
impl<'a> From<&'_ Stmt<'a>> for Node<'a>
[src]
impl<'a> From<Stmt<'a>> for Node<'a>
[src]
impl<'a> NodeTrait<'a> for Stmt<'a>
[src]
fn parent(&self) -> Option<Node<'a>>
[src]
fn children(&self) -> Vec<Node<'a>>
[src]
fn into_node(&self) -> Node<'a>
[src]
fn kind(&self) -> NodeKind
[src]
fn ancestors(&self) -> AncestorIterator<'a>ⓘNotable traits for AncestorIterator<'a>
impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>;
[src]
Notable traits for AncestorIterator<'a>
impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>;
fn start_line(&self) -> usize
[src]
fn end_line(&self) -> usize
[src]
fn start_column(&self) -> usize
[src]
fn end_column(&self) -> usize
[src]
fn width(&self) -> usize
[src]
fn child_index(&self) -> usize
[src]
fn previous_sibling(&self) -> Option<Node<'a>>
[src]
fn previous_siblings(&self) -> Vec<Node<'a>>
[src]
fn next_sibling(&self) -> Option<Node<'a>>
[src]
fn next_siblings(&self) -> Vec<Node<'a>>
[src]
fn tokens(&self) -> &'a [TokenAndSpan]
[src]
fn children_with_tokens(&self) -> Vec<NodeOrToken<'a>>
[src]
fn children_with_tokens_fast(
&self,
program: &dyn RootNode<'a>
) -> Vec<NodeOrToken<'a>>
[src]
&self,
program: &dyn RootNode<'a>
) -> Vec<NodeOrToken<'a>>
fn leading_comments(&self) -> CommentsIterator<'a>ⓘNotable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
[src]
Notable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
fn trailing_comments(&self) -> CommentsIterator<'a>ⓘNotable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
[src]
Notable traits for CommentsIterator<'a>
impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment;
fn program(&self) -> Program<'a>
[src]
fn module(&self) -> &Module<'a>
[src]
fn script(&self) -> &Script<'a>
[src]
fn text(&self) -> &'a str
[src]
fn previous_token(&self) -> Option<&'a TokenAndSpan>
[src]
fn next_token(&self) -> Option<&'a TokenAndSpan>
[src]
fn previous_tokens(&self) -> &'a [TokenAndSpan]
[src]
fn next_tokens(&self) -> &'a [TokenAndSpan]
[src]
impl<'a> Spanned for Stmt<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Stmt<'a>
[src]
impl<'a> !Send for Stmt<'a>
[src]
impl<'a> !Sync for Stmt<'a>
[src]
impl<'a> Unpin for Stmt<'a>
[src]
impl<'a> !UnwindSafe for Stmt<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Node for T where
T: Any + ?Sized,
T: Any + ?Sized,
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,