[−][src]Struct xi_rope::multiset::Mapper
Fields
subset_amount_consumed: usize
Methods
impl<'a> Mapper<'a>
[src]
pub fn doc_index_to_subset(&mut self, i: usize) -> usize
[src]
Map a coordinate in the document this subset corresponds to, to a
coordinate in the subset matched by the CountMatcher
. For example,
if the Subset is a set of deletions and the matcher is
CountMatcher::NonZero
, this would map indices in the union string to
indices in the tombstones string.
Will return the closest coordinate in the subset if the index is not in the subset. If the coordinate is past the end of the subset it will return one more than the largest index in the subset (i.e the length). This behaviour is suitable for mapping closed-open intervals in a string to intervals in a subset of the string.
In order to guarantee good performance, this method must be called
with i
values in non-decreasing order or it will panic. This allows
the total cost to be O(n) where n = max(calls,ranges)
over all times
called on a single Mapper
.
Auto Trait Implementations
impl<'a> Sync for Mapper<'a>
impl<'a> Send for Mapper<'a>
impl<'a> Unpin for Mapper<'a>
impl<'a> RefUnwindSafe for Mapper<'a>
impl<'a> UnwindSafe for Mapper<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,