[][src]Type Definition xi_rope::spans::Spans

type Spans<T> = Node<SpansInfo<T>>;

Methods

impl<T: Clone> Spans<T>[src]

pub fn transform<N: NodeInfo>(
    &self,
    base_start: usize,
    base_end: usize,
    xform: &mut Transformer<N>
) -> Self
[src]

Perform operational transformation on a spans object intended to be edited into a sequence at the given offset.

pub fn merge<F, O>(&self, other: &Self, f: F) -> Spans<O> where
    F: FnMut(&T, Option<&T>) -> O,
    O: Clone
[src]

Creates a new Spans instance by merging spans from other with self, using a closure to transform values.

New spans are created from non-overlapping regions of existing spans, and by combining overlapping regions into new spans. In all cases, new values are generated by calling a closure that transforms the value of the existing span or spans.

Panics

Panics if self and other have different lengths.

Important traits for SpanIter<'a, T>
pub fn iter(&self) -> SpanIter<T>[src]

pub fn apply_shape<M: NodeInfo>(&mut self, delta: &Delta<M>)[src]

Applies a generic delta to self, inserting empty spans for any added regions.

This is intended to be used to keep spans up to date with a Rope as edits occur.

pub fn delete_intersecting(&mut self, interval: Interval)[src]

Deletes all spans that intersect with interval.

Trait Implementations

impl<T: Clone + Debug> Debug for Spans<T>[src]