Type Alias PatFieldPtr

Source
pub type PatFieldPtr = AstPtr<Either<RecordExprField, RecordPatField>>;

Aliased Type§

struct PatFieldPtr { /* private fields */ }

Implementations

§

impl<N> AstPtr<N>
where N: AstNode,

pub fn new(node: &N) -> AstPtr<N>

pub fn to_node(&self, root: &SyntaxNode<RustLanguage>) -> N

pub fn syntax_node_ptr(&self) -> SyntaxNodePtr<RustLanguage>

pub fn text_range(&self) -> TextRange

pub fn cast<U>(self) -> Option<AstPtr<U>>
where U: AstNode,

pub fn kind(&self) -> SyntaxKind

pub fn upcast<M>(self) -> AstPtr<M>
where M: AstNode, N: Into<M>,

pub fn try_from_raw(raw: SyntaxNodePtr<RustLanguage>) -> Option<AstPtr<N>>

Like SyntaxNodePtr::cast but the trait bounds work out.

pub fn wrap_left<R>(self) -> AstPtr<Either<N, R>>
where Either<N, R>: AstNode,

pub fn wrap_right<L>(self) -> AstPtr<Either<L, N>>
where Either<L, N>: AstNode,

Trait Implementations

§

impl<N> Clone for AstPtr<N>
where N: AstNode,

§

fn clone(&self) -> AstPtr<N>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<N> Debug for AstPtr<N>
where N: AstNode,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<N> Hash for AstPtr<N>
where N: AstNode,

§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<N> PartialEq for AstPtr<N>
where N: AstNode,

§

fn eq(&self, other: &AstPtr<N>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<N> Copy for AstPtr<N>
where N: AstNode,

§

impl<N> Eq for AstPtr<N>
where N: AstNode,