pub type PatPtr = AstPtr<Pat>;
Aliased Type§
struct PatPtr { /* private fields */ }
Implementations
§impl<N> AstPtr<N>where
N: AstNode,
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>>
pub fn try_from_raw(raw: SyntaxNodePtr<RustLanguage>) -> Option<AstPtr<N>>
Like SyntaxNodePtr::cast
but the trait bounds work out.