pub struct AnnotatedRope<M> { /* private fields */ }
Implementations§
Source§impl<M: Clone> AnnotatedRope<M>
impl<M: Clone> AnnotatedRope<M>
pub fn new() -> Self
pub fn fragment(v: impl AsRef<str>, meta: M) -> Self
pub fn fragment_chars(v: impl IntoIterator<Item = char>, meta: M) -> Self
pub fn repeated_char_fragment(char: char, count: usize, meta: M) -> Self
👎Deprecated: use fragment_chars with repeated char
pub fn insert(&mut self, position: usize, buf: Self)
pub fn remove(&mut self, range: impl RangeBounds<usize>)
pub fn splice(&mut self, range: impl RangeBounds<usize>, value: Option<Self>)
pub fn extend(&mut self, buf: impl IntoIterator<Item = Self>)
pub fn append(&mut self, buf: Self)
pub fn fragments(&self) -> impl IntoIterator<Item = (Fragments<'_>, &M)>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, pos: usize) -> Option<(char, &M)>
pub fn chars(&self) -> Chars<'_>
pub fn resize(&mut self, size: usize, char: char, meta: M)
pub fn split_at(self, pos: usize) -> (Self, Self)
pub fn index_of(&self, char: char) -> Option<usize>
pub fn split(&self, char: char) -> Vec<Self>
Source§impl<M: Clone + PartialEq + Debug> AnnotatedRope<M>
impl<M: Clone + PartialEq + Debug> AnnotatedRope<M>
pub fn annotate_range<T>(&mut self, range: impl RangeBounds<usize>, value: &T)where
M: ApplyAnnotation<T>,
Trait Implementations§
Source§impl<M: Clone> Clone for AnnotatedRope<M>
impl<M: Clone> Clone for AnnotatedRope<M>
Source§fn clone(&self) -> AnnotatedRope<M>
fn clone(&self) -> AnnotatedRope<M>
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<M: Debug> Debug for AnnotatedRope<M>
impl<M: Debug> Debug for AnnotatedRope<M>
Source§impl<M: Clone> FromIterator<AnnotatedRope<M>> for AnnotatedRope<M>
impl<M: Clone> FromIterator<AnnotatedRope<M>> for AnnotatedRope<M>
Source§fn from_iter<T: IntoIterator<Item = AnnotatedRope<M>>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = AnnotatedRope<M>>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl<M> !Freeze for AnnotatedRope<M>
impl<M> !RefUnwindSafe for AnnotatedRope<M>
impl<M> Send for AnnotatedRope<M>where
M: Send,
impl<M> !Sync for AnnotatedRope<M>
impl<M> Unpin for AnnotatedRope<M>
impl<M> !UnwindSafe for AnnotatedRope<M>
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more