Struct deno_ast::view::JSXElement
source · pub struct JSXElement<'a> {
pub inner: &'a JSXElement,
pub opening: &'a JSXOpeningElement<'a>,
pub children: Vec<JSXElementChild<'a>, Global>,
pub closing: Option<&'a JSXClosingElement<'a>>,
/* private fields */
}Fields§
§inner: &'a JSXElement§opening: &'a JSXOpeningElement<'a>§children: Vec<JSXElementChild<'a>, Global>§closing: Option<&'a JSXClosingElement<'a>>Implementations§
Trait Implementations§
source§impl<'a> CastableNode<'a> for JSXElement<'a>
impl<'a> CastableNode<'a> for JSXElement<'a>
source§impl<'a> Clone for JSXElement<'a>
impl<'a> Clone for JSXElement<'a>
source§fn clone(&self) -> JSXElement<'a>
fn clone(&self) -> JSXElement<'a>
Returns a copy 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<'a> From<&JSXElement<'a>> for Node<'a>
impl<'a> From<&JSXElement<'a>> for Node<'a>
source§fn from(node: &JSXElement<'a>) -> Node<'a>
fn from(node: &JSXElement<'a>) -> Node<'a>
Converts to this type from the input type.
source§impl<'a> NodeTrait<'a> for JSXElement<'a>
impl<'a> NodeTrait<'a> for JSXElement<'a>
fn parent(&self) -> Option<Node<'a>>
fn children(&self) -> Vec<Node<'a>, Global> ⓘ
fn as_node(&self) -> Node<'a>
fn kind(&self) -> NodeKind
fn ancestors(&self) -> AncestorIterator<'a> ⓘ
fn start_line(&self) -> usize
fn end_line(&self) -> usize
fn start_column(&self) -> usize
fn end_column(&self) -> usize
fn char_width(&self) -> usize
fn child_index(&self) -> usize
fn previous_sibling(&self) -> Option<Node<'a>>
source§fn previous_siblings(&self) -> Vec<Node<'a>, Global> ⓘ
fn previous_siblings(&self) -> Vec<Node<'a>, Global> ⓘ
Gets the previous siblings in the order they appear in the file.
source§fn next_sibling(&self) -> Option<Node<'a>>
fn next_sibling(&self) -> Option<Node<'a>>
Gets the next siblings in the order they appear in the file.
fn next_siblings(&self) -> Vec<Node<'a>, Global> ⓘ
fn tokens(&self) -> &'a [TokenAndSpan]
fn children_with_tokens(&self) -> Vec<NodeOrToken<'a>, Global> ⓘ
fn children_with_tokens_fast(
&self,
program: &dyn RootNode<'a>
) -> Vec<NodeOrToken<'a>, Global> ⓘ
fn leading_comments(&self) -> CommentsIterator<'a> ⓘ
fn trailing_comments(&self) -> CommentsIterator<'a> ⓘ
source§fn module(&self) -> &Module<'a>
fn module(&self) -> &Module<'a>
Gets the root node if the view was created from a Module; otherwise panics.
source§fn script(&self) -> &Script<'a>
fn script(&self) -> &Script<'a>
Gets the root node if the view was created from a Script; otherwise panics.
fn text(&self) -> &'a str
fn previous_token(&self) -> Option<&'a TokenAndSpan>
fn next_token(&self) -> Option<&'a TokenAndSpan>
source§fn previous_tokens(&self) -> &'a [TokenAndSpan]
fn previous_tokens(&self) -> &'a [TokenAndSpan]
Gets the previous tokens in the order they appear in the file.
source§fn next_tokens(&self) -> &'a [TokenAndSpan]
fn next_tokens(&self) -> &'a [TokenAndSpan]
Gets the next tokens in the order they appear in the file.