Struct ra_ap_syntax::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>(&self, range: R) -> SyntaxText where
R: SyntaxTextRange,
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, E>(&self, f: F) -> Result<(), E> where
F: FnMut(&str) -> Result<(), E>,
pub fn for_each_chunk<F>(&self, f: F) where
F: FnMut(&str),
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 PartialEq<&str> for SyntaxText
impl PartialEq<&str> for SyntaxText
sourceimpl PartialEq<SyntaxText> for &str
impl PartialEq<SyntaxText> for &str
sourceimpl PartialEq<SyntaxText> for SyntaxText
impl PartialEq<SyntaxText> for SyntaxText
sourceimpl PartialEq<SyntaxText> for str
impl PartialEq<SyntaxText> for str
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.