Struct rowan::cursor::SyntaxToken
source · pub struct SyntaxToken { /* private fields */ }
Implementations§
source§impl SyntaxToken
impl SyntaxToken
pub fn replace_with(&self, replacement: GreenToken) -> GreenNode
pub fn kind(&self) -> SyntaxKind
pub fn text_range(&self) -> TextRange
pub fn index(&self) -> usize
pub fn text(&self) -> &str
pub fn green(&self) -> &GreenTokenData
pub fn parent(&self) -> Option<SyntaxNode>
pub fn ancestors(&self) -> impl Iterator<Item = SyntaxNode>
pub fn next_sibling_or_token(&self) -> Option<SyntaxElement>
pub fn prev_sibling_or_token(&self) -> Option<SyntaxElement>
pub fn siblings_with_tokens( &self, direction: Direction, ) -> impl Iterator<Item = SyntaxElement>
pub fn next_token(&self) -> Option<SyntaxToken>
pub fn prev_token(&self) -> Option<SyntaxToken>
pub fn detach(&self)
Trait Implementations§
source§impl Clone for SyntaxToken
impl Clone for SyntaxToken
source§impl Debug for SyntaxToken
impl Debug for SyntaxToken
source§impl Display for SyntaxToken
impl Display for SyntaxToken
source§impl Drop for SyntaxToken
impl Drop for SyntaxToken
source§impl<L: Language> From<SyntaxToken<L>> for SyntaxToken
impl<L: Language> From<SyntaxToken<L>> for SyntaxToken
source§fn from(token: SyntaxToken<L>) -> SyntaxToken
fn from(token: SyntaxToken<L>) -> SyntaxToken
Converts to this type from the input type.
source§impl From<SyntaxToken> for SyntaxElement
impl From<SyntaxToken> for SyntaxElement
source§fn from(token: SyntaxToken) -> SyntaxElement
fn from(token: SyntaxToken) -> SyntaxElement
Converts to this type from the input type.
source§impl<L: Language> From<SyntaxToken> for SyntaxToken<L>
impl<L: Language> From<SyntaxToken> for SyntaxToken<L>
source§fn from(raw: SyntaxToken) -> SyntaxToken<L>
fn from(raw: SyntaxToken) -> SyntaxToken<L>
Converts to this type from the input type.
source§impl Hash for SyntaxToken
impl Hash for SyntaxToken
source§impl PartialEq for SyntaxToken
impl PartialEq for SyntaxToken
impl Eq for SyntaxToken
Auto Trait Implementations§
impl Freeze for SyntaxToken
impl !RefUnwindSafe for SyntaxToken
impl !Send for SyntaxToken
impl !Sync for SyntaxToken
impl Unpin for SyntaxToken
impl !UnwindSafe for SyntaxToken
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)