Type Alias Pointer

Source
pub type Pointer<T> = Rc<T>;
Expand description

The main pointer used in the Cst. It’s just Rc. The only reason this type exists is to allow easily switching to others, like Box or Arc by only editing one line instead of mass refactoring.

Aliased Type§

struct Pointer<T> { /* private fields */ }

Trait Implementations§

Source§

impl<T: GetRange> GetRange for Pointer<T>

Source§

fn get_range(&self) -> Result<Range, GetRangeError>

Get the range of the node. This will only fail if Cst.status is AstStatus::HasErrors.
Source§

impl<T: Parse> Parse for Pointer<T>

Source§

fn parse( token: Token, lexer: &mut Lexer<'_>, errors: &mut Vec<ParseError>, ) -> Option<Self>

Try parsing the current item, starting from the passed token.
Source§

impl<T: Print> Print for Pointer<T>

Source§

fn print(&self) -> String

Prints the whole token including all surrounding spaces.