Struct rowan::SyntaxText
source · pub struct SyntaxText { /* private fields */ }
Implementations§
source§impl 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>
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§
source§impl Clone for SyntaxText
impl Clone for SyntaxText
source§fn clone(&self) -> SyntaxText
fn clone(&self) -> SyntaxText
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SyntaxText
impl Debug for SyntaxText
source§impl Display for SyntaxText
impl Display for SyntaxText
source§impl From<SyntaxText> for String
impl From<SyntaxText> for String
source§fn from(text: SyntaxText) -> String
fn from(text: SyntaxText) -> String
Converts to this type from the input type.
source§impl PartialEq<&str> for SyntaxText
impl PartialEq<&str> for SyntaxText
source§impl PartialEq<SyntaxText> for &str
impl PartialEq<SyntaxText> for &str
source§fn 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 ==
.source§impl PartialEq<SyntaxText> for str
impl PartialEq<SyntaxText> for str
source§fn 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 ==
.source§impl PartialEq<str> for SyntaxText
impl PartialEq<str> for SyntaxText
source§impl PartialEq for SyntaxText
impl PartialEq for SyntaxText
source§fn 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 ==
.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§
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