pub trait CursorTrait<'s, T: 's, E = NoneExtras<T>>{
Show 55 methods
// Required 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];
fn jump(&mut self, pos: usize) -> Option<&'s T>;
// Provided methods
fn item_size(&self) -> usize { ... }
fn range(&self) -> Range<usize> ⓘ { ... }
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> ⓘ { ... }
fn as_slice_loaded(&self) -> &'s [T] { ... }
fn as_preserved_slice(&self) -> &'s [T] { ... }
fn as_preserved_slice_include_current(&self) -> &'s [T] { ... }
fn current(&self) -> &'s T { ... }
fn current_deref(&self) -> T
where T: Copy { ... }
fn as_remaining_slice(&self) -> &'s [T] { ... }
fn as_remaining_slice_include_current(&self) -> &'s [T] { ... }
fn as_left_side_slice(&self) -> &'s [T] { ... }
fn as_right_side_slice(&self) -> &'s [T] { ... }
fn as_left_side_slice_include_current(&self) -> &'s [T] { ... }
fn as_right_side_slice_include_current(&self) -> &'s [T] { ... }
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§
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]
fn jump(&mut self, pos: usize) -> Option<&'s T>
Provided Methods§
fn item_size(&self) -> usize
fn range(&self) -> Range<usize> ⓘ
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)
Sourcefn to_range_extras(&self) -> Range<E> ⓘ
fn to_range_extras(&self) -> Range<E> ⓘ
cloning saved().extras
to self.extras()
.
Sourcefn as_slice_loaded(&self) -> &'s [T]
fn as_slice_loaded(&self) -> &'s [T]
saved pos to current pos.
fn as_preserved_slice(&self) -> &'s [T]
fn as_preserved_slice_include_current(&self) -> &'s [T]
fn current(&self) -> &'s T
fn current_deref(&self) -> Twhere
T: Copy,
fn as_remaining_slice(&self) -> &'s [T]
fn as_remaining_slice_include_current(&self) -> &'s [T]
fn as_left_side_slice(&self) -> &'s [T]
fn as_right_side_slice(&self) -> &'s [T]
fn as_left_side_slice_include_current(&self) -> &'s [T]
fn as_right_side_slice_include_current(&self) -> &'s [T]
Sourcefn jump_to_offset(&mut self, offset: isize) -> Option<&'s T>
fn jump_to_offset(&mut self, offset: isize) -> Option<&'s T>
if abs == 1, initial coordinate is -1 or just 0
fn jump_to_first(&mut self) -> &'s T
fn jump_to_last(&mut self) -> &'s T
Sourcefn first_to_last(&mut self)
fn first_to_last(&mut self)
same with
ⓘ
{
self.jump_to_first();
self.next_to_last();
}
Sourcefn jump_to_load(&mut self) -> &'s T
fn jump_to_load(&mut self) -> &'s T
jump to the saved pos.
Sourcefn jump_cycle(&mut self, pos: isize) -> &'s T
fn jump_cycle(&mut self, pos: isize) -> &'s T
WARNING: isize
Sourcefn jump_to_offset_cycle(&mut self, offset: isize) -> &'s T
fn jump_to_offset_cycle(&mut self, offset: isize) -> &'s T
WARNING: isize
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>
Sourcefn next_to_load(&mut self) -> &'s T
fn next_to_load(&mut self) -> &'s T
bump until meets saved pos.
Sourcefn next_cycle(&mut self) -> &'s T
fn next_cycle(&mut self) -> &'s T
bump until meets saved pos.
Sourcefn next_to_offset_cycle(&mut self, offset: isize) -> &'s T
fn next_to_offset_cycle(&mut self, offset: isize) -> &'s T
bump until meets saved pos.