[−][src]Struct xi_rope::delta::Builder
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,
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,
N: Send + Sync,
<N as NodeInfo>::L: Send + Sync,
impl<N> UnwindSafe for Builder<N> where
N: RefUnwindSafe,
<N as NodeInfo>::L: RefUnwindSafe,
N: RefUnwindSafe,
<N as NodeInfo>::L: RefUnwindSafe,
impl<N> RefUnwindSafe for Builder<N> where
N: RefUnwindSafe,
<N as NodeInfo>::L: RefUnwindSafe,
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]
U: From<T>,
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,