Struct woot::WString
[−]
[src]
pub struct WString<S: Debug> { /* fields omitted */ }
The workhorse.
Methods
impl<S> WString<S> where S: Clone + Debug
[src]
fn with_id(id: usize) -> WString<S>
fn new() -> WString<S>
Create a new Instance with random site-id.
fn len(&self) -> usize
Length of visible data.
fn contents(&self) -> Vec<S>
Visible data
fn iter(&self) -> WStringIter<S>
Visible data as an iterator
fn apply(&mut self, op: Operation<S>)
Applies Operation op.
fn ins(&mut self, n: usize, v: S) -> Operation<S>
Insert v at position n. This will panic if n > len()
fn del(&mut self, n: usize) -> Operation<S>
delete charater at position n panics if n >= len()
Trait Implementations
impl<S> Debug for WString<S> where S: Debug
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl<S> Clone for WString<S> where S: Clone + Debug
[src]
fn clone(&self) -> WString<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more