Struct rowan::SyntaxText
source · [−]pub struct SyntaxText { /* private fields */ }
Implementations
sourceimpl SyntaxText
impl SyntaxText
pub fn len(&self) -> TextSize
pub fn is_empty(&self) -> bool
pub fn contains_char(&self, c: char) -> bool
pub fn find_char(&self, c: char) -> Option<TextSize>
pub fn char_at(&self, offset: TextSize) -> Option<char>
pub fn slice<R: SyntaxTextRange>(&self, range: R) -> SyntaxText
pub fn try_fold_chunks<T, F, E>(&self, init: T, f: F) -> Result<T, E>where
F: FnMut(T, &str) -> Result<T, E>,
pub fn try_for_each_chunk<F: FnMut(&str) -> Result<(), E>, E>(
&self,
f: F
) -> Result<(), E>
pub fn for_each_chunk<F: FnMut(&str)>(&self, f: F)
Trait Implementations
sourceimpl Clone for SyntaxText
impl Clone for SyntaxText
sourcefn clone(&self) -> SyntaxText
fn clone(&self) -> SyntaxText
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 more
sourceimpl Debug for SyntaxText
impl Debug for SyntaxText
sourceimpl Display for SyntaxText
impl Display for SyntaxText
sourceimpl From<SyntaxText> for String
impl From<SyntaxText> for String
sourcefn from(text: SyntaxText) -> String
fn from(text: SyntaxText) -> String
Converts to this type from the input type.
sourceimpl PartialEq<&str> for SyntaxText
impl PartialEq<&str> for SyntaxText
sourceimpl PartialEq<SyntaxText> for &str
impl PartialEq<SyntaxText> for &str
sourcefn eq(&self, rhs: &SyntaxText) -> bool
fn eq(&self, rhs: &SyntaxText) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialEq<SyntaxText> for SyntaxText
impl PartialEq<SyntaxText> for SyntaxText
sourcefn eq(&self, other: &SyntaxText) -> bool
fn eq(&self, other: &SyntaxText) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialEq<SyntaxText> for str
impl PartialEq<SyntaxText> for str
sourcefn eq(&self, rhs: &SyntaxText) -> bool
fn eq(&self, rhs: &SyntaxText) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialEq<str> for SyntaxText
impl PartialEq<str> for SyntaxText
impl Eq for SyntaxText
Auto Trait Implementations
impl !RefUnwindSafe for SyntaxText
impl !Send for SyntaxText
impl !Sync for SyntaxText
impl Unpin for SyntaxText
impl !UnwindSafe for SyntaxText
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