Struct ra_syntax::ast::Whitespace
source · pub struct Whitespace<'a> { /* private fields */ }
Implementations
sourceimpl<'a> Whitespace<'a>
impl<'a> Whitespace<'a>
pub fn text(&self) -> &SmolStr
pub fn count_newlines_lazy(&self) -> impl Iterator<Item = &()>
pub fn has_newlines(&self) -> bool
Trait Implementations
sourceimpl<'a> AstNode<'a> for Whitespace<'a>
impl<'a> AstNode<'a> for Whitespace<'a>
fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self>
fn syntax(self) -> SyntaxNodeRef<'a>
sourceimpl<'a> Clone for Whitespace<'a>
impl<'a> Clone for Whitespace<'a>
sourcefn clone(&self) -> Whitespace<'a>
fn clone(&self) -> Whitespace<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for Whitespace<'a>
impl<'a> Debug for Whitespace<'a>
sourceimpl<'a> From<Whitespace<'a>> for WhitespaceNode
impl<'a> From<Whitespace<'a>> for WhitespaceNode
sourcefn from(ast: Whitespace<'a>) -> WhitespaceNode
fn from(ast: Whitespace<'a>) -> WhitespaceNode
Converts to this type from the input type.
impl<'a> Copy for Whitespace<'a>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Whitespace<'a>
impl<'a> Send for Whitespace<'a>
impl<'a> Sync for Whitespace<'a>
impl<'a> Unpin for Whitespace<'a>
impl<'a> !UnwindSafe for Whitespace<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more