[][src]Struct xi_rope::delta::Builder

pub struct Builder<N: NodeInfo> { /* fields omitted */ }

A builder for creating new Delta objects.

Note that all edit operations must be sorted; the start point of each interval must be no less than the end point of the previous one.

Methods

impl<N: NodeInfo> Builder<N>[src]

pub fn new(base_len: usize) -> Builder<N>[src]

Creates a new builder, applicable to a base rope of length base_len.

pub fn delete<T: IntervalBounds>(&mut self, interval: T)[src]

Deletes the given interval. Panics if interval is not properly sorted.

pub fn replace<T: IntervalBounds>(&mut self, interval: T, rope: Node<N>)[src]

Replaces the given interval with the new rope. Panics if interval is not properly sorted.

pub fn is_empty(&self) -> bool[src]

Determines if delta would be a no-op transformation if built.

pub fn build(self) -> Delta<N>[src]

Builds the Delta.

Auto Trait Implementations

impl<N> Sync for Builder<N> where
    N: Send + Sync,
    <N as NodeInfo>::L: Send + Sync

impl<N> Unpin for Builder<N>

impl<N> Send for Builder<N> where
    N: Send + Sync,
    <N as NodeInfo>::L: Send + Sync

impl<N> UnwindSafe for Builder<N> where
    N: RefUnwindSafe,
    <N as NodeInfo>::L: RefUnwindSafe

impl<N> RefUnwindSafe for Builder<N> where
    N: RefUnwindSafe,
    <N as NodeInfo>::L: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]