Trait cursor::CursorTrait[][src]

pub trait CursorTrait<'s, T: 's, E = NoneExtras<T>> where
    Self: Iterator<Item = &'s T>,
    E: Extras<T>, 
{
Show 55 methods fn is_init(&self) -> bool;
fn noeffects(&self) -> bool;
fn noeffects_mut(&mut self) -> &mut bool;
fn backwards(&self) -> bool;
fn backwards_mut(&mut self) -> &mut bool;
fn pos(&self) -> usize;
fn extras(&self) -> &E;
fn extras_mut(&mut self) -> &mut E;
fn reset(&mut self);
fn save(&mut self);
fn saved(&self) -> &CursorInfo<T, E>;
fn load(&mut self);
fn as_slice(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
;
fn jump(&mut self, pos: usize) -> Option<&'s T>; fn item_size(&self) -> usize { ... }
fn range(&self) -> Range<usize>
Notable traits for Range<A>
impl<A> Iterator for Range<A> where
    A: Step
type Item = A;
{ ... }
fn len(&self) -> usize { ... }
fn is_empty(&self) -> bool { ... }
fn noeffects_on(&mut self) { ... }
fn noeffects_off(&mut self) { ... }
fn turnaround(&mut self) { ... }
fn head_to_left(&mut self) { ... }
fn head_to_right(&mut self) { ... }
fn head_to_pos(&mut self, pos: usize) { ... }
fn to_range_extras(&self) -> Range<E>
Notable traits for Range<A>
impl<A> Iterator for Range<A> where
    A: Step
type Item = A;
{ ... }
fn as_slice_loaded(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_preserved_slice(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_preserved_slice_include_current(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn current(&self) -> &'s T { ... }
fn current_deref(&self) -> T
    where
        T: Copy
, { ... }
fn as_remaining_slice(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_remaining_slice_include_current(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_left_side_slice(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_right_side_slice(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_left_side_slice_include_current(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_right_side_slice_include_current(&self) -> &'s [T]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn jump_to_offset(&mut self, offset: isize) -> Option<&'s T> { ... }
fn jump_to_first(&mut self) -> &'s T { ... }
fn jump_to_last(&mut self) -> &'s T { ... }
fn first_to_last(&mut self) { ... }
fn jump_to_load(&mut self) -> &'s T { ... }
fn jump_cycle(&mut self, pos: isize) -> &'s T { ... }
fn jump_to_offset_cycle(&mut self, offset: isize) -> &'s T { ... }
fn next_to_pos(&mut self, pos: usize) -> Option<&'s T> { ... }
fn next_to_offset(&mut self, offset: isize) -> Option<&'s T> { ... }
fn next_to_first(&mut self) -> &'s T { ... }
fn next_to_last(&mut self) -> &'s T { ... }
fn next_to_left(&mut self) -> Option<&'s T> { ... }
fn next_to_right(&mut self) -> Option<&'s T> { ... }
fn next_to_until(&mut self, f: fn(_: &T) -> bool) -> Option<&'s T> { ... }
fn next_to_while(&mut self, f: fn(_: &T) -> bool) -> Option<&'s T> { ... }
fn next_to_load(&mut self) -> &'s T { ... }
fn next_cycle(&mut self) -> &'s T { ... }
fn prev(&mut self) -> Option<&'s T> { ... }
fn next_to_offset_cycle(&mut self, offset: isize) -> &'s T { ... }
}

Required methods

Provided methods

cloning saved().extras to self.extras().

saved pos to current pos.

if abs == 1, initial coordinate is -1 or just 0

same with

{
    self.jump_to_first();
    self.next_to_last();
}

jump to the saved pos.

WARNING: isize

WARNING: isize

bump until meets f() = true.

bump while f() = true.

bump until meets saved pos.

bump until meets saved pos.

next_back() without turnaround()

bump until meets saved pos.

Implementors