Trait glsl_lang::ast::NodeDisplay[][src]

pub trait NodeDisplay {
    pub fn name() -> Option<&'static str>;
pub fn start(&self) -> Option<usize>;
pub fn end(&self) -> Option<usize>;
pub fn source_id(&self) -> Option<usize>;
pub fn display(&self) -> NodeDisplayWrapper<'_, Self>;
pub fn display_extra(&self, f: &mut Formatter<'_>) -> Result<(), Error>;
pub fn display_children(
        &self,
        level: usize,
        f: &mut Formatter<'_>
    ) -> Result<(), Error>; }

Trait for displaying a syntax node

Required methods

pub fn name() -> Option<&'static str>[src]

Name of the syntax node’s type

pub fn start(&self) -> Option<usize>[src]

Starting position of the node

pub fn end(&self) -> Option<usize>[src]

Ending position of the node

pub fn source_id(&self) -> Option<usize>[src]

Source id of the node

pub fn display(&self) -> NodeDisplayWrapper<'_, Self>[src]

Obtain a display wrapper for the current node

pub fn display_extra(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Display extra information for the node

Parameters

  • f: formatter to output to

pub fn display_children(
    &self,
    level: usize,
    f: &mut Formatter<'_>
) -> Result<(), Error>
[src]

Display the node’s children

Parameters

  • level: current indentation level
  • f: formatter to output to
Loading content...

Implementors

impl<T> NodeDisplay for Node<T> where
    T: NodeContentDisplay + NodeContent
[src]

impl<T> NodeDisplay for T where
    T: NodeContentDisplay
[src]

Loading content...