Struct iodyn::raz::Raz
[−]
[src]
pub struct Raz<E: Debug + Clone + Eq + Hash + 'static, M: RazMeta<E> + 'static> { /* fields omitted */ }
Random access zipper
A cursor into a sequence
Methods
impl<E: Debug + Clone + Eq + Hash + 'static, M: RazMeta<E>> Raz<E, M>
[src]
fn new() -> Raz<E, M>
Create a new RAZ, for an empty sequence
fn unfocus(self) -> RazTree<E, M>
unfocus the RazTree before refocusing on a new location in the sequence.
fn push_left(&mut self, elm: E) -> usize
add an element to the left of the cursor
returns number of non-archived elements
fn push_right(&mut self, elm: E) -> usize
add an element to the right of the cursor
returns number of non-archived elements
fn peek_left(&self) -> Option<E>
peek at the element to the left of the cursor
fn peek_right(&self) -> Option<E>
peek at the element to the left of the cursor
fn archive_left(&mut self, level: u32, name: Option<Name>)
mark the data at the left to be part of a subsequence
fn archive_right(&mut self, level: u32, name: Option<Name>)
mark the data at the right to be part of a subsequence
fn pop_left(&mut self) -> Option<E>
remove and return an element to the left of the cursor
if an archive point is to the left of the cursor, it will be removed
fn pop_right(&mut self) -> Option<E>
remove and return an element to the right of the cursor
if an archive point is to the right of the cursor, it will be removed
Trait Implementations
impl<E: Clone + Debug + Clone + Eq + Hash + 'static, M: Clone + RazMeta<E> + 'static> Clone for Raz<E, M>
[src]
fn clone(&self) -> Raz<E, M>
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
impl<E: Eq + Debug + Clone + Eq + Hash + 'static, M: Eq + RazMeta<E> + 'static> Eq for Raz<E, M>
[src]
impl<E: PartialEq + Debug + Clone + Eq + Hash + 'static, M: PartialEq + RazMeta<E> + 'static> PartialEq for Raz<E, M>
[src]
fn eq(&self, __arg_0: &Raz<E, M>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Raz<E, M>) -> bool
This method tests for !=
.
impl<E: Hash + Debug + Clone + Eq + Hash + 'static, M: Hash + RazMeta<E> + 'static> Hash for Raz<E, M>
[src]
fn hash<__HEM: Hasher>(&self, __arg_0: &mut __HEM)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more