Trait cursor::StrCursorTrait[][src]

pub trait StrCursorTrait<'s, E = NoneExtras<char>> where
    Self: Iterator<Item = char>,
    E: Extras<char>, 
{
Show 65 methods fn len(&mut self) -> usize;
fn is_len(&self) -> bool;
fn is_init(&self) -> bool;
fn noeffects(&self) -> bool;
fn noeffects_mut(&mut self) -> &mut bool;
fn backwards(&self) -> bool;
fn turnaround(&mut self);
fn pos(&self) -> usize;
fn pos_as_bytes(&self) -> usize;
fn char_start_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) -> &StrCursorInfo<E>;
fn load(&mut self);
fn as_bytes(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
;
fn current(&self) -> char;
fn jump(&mut self, pos: usize) -> Option<char>;
fn jump_to_last(&mut self) -> char; fn item_size(&self) -> usize { ... }
fn range(&mut self) -> Range<usize>
Notable traits for Range<A>
impl<A> Iterator for Range<A> where
    A: Step
type Item = A;
{ ... }
fn len_as_bytes(&self) -> usize { ... }
fn is_empty(&self) -> bool { ... }
fn noeffects_on(&mut self) { ... }
fn noeffects_off(&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_bytes_loaded(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_char_bytes_loaded(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_preserved_bytes(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_preserved_bytes_include_current(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn current_byte(&self) -> u8 { ... }
fn as_remaining_bytes(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_remaining_bytes_include_current(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_left_side_bytes(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_right_side_bytes(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_left_side_bytes_include_current(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_right_side_bytes_include_current(&self) -> &'s [u8]
Notable traits for &'_ [u8]
impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... }
fn as_str(&self) -> &'s str { ... }
fn as_str_loaded(&self) -> &'s str { ... }
fn as_preserved_str(&self) -> &'s str { ... }
fn as_remaining_str(&self) -> &'s str { ... }
fn as_left_side_str(&self) -> &'s str { ... }
fn as_right_side_str(&self) -> &'s str { ... }
fn jump_to_offset(&mut self, offset: isize) -> Option<char> { ... }
fn jump_to_first(&mut self) -> char { ... }
fn first_to_last(&mut self) { ... }
fn jump_to_load(&mut self) -> char { ... }
fn jump_cycle(&mut self, pos: isize) -> char { ... }
fn jump_to_offset_cycle(&mut self, offset: isize) -> char { ... }
fn next_to_pos(&mut self, pos: usize) -> Option<char> { ... }
fn next_to_offset(&mut self, offset: isize) -> Option<char> { ... }
fn next_to_first(&mut self) -> char { ... }
fn next_to_last(&mut self) -> char { ... }
fn next_to_left(&mut self) -> Option<char> { ... }
fn next_to_right(&mut self) -> Option<char> { ... }
fn next_to_until(&mut self, f: fn(_: char) -> bool) -> Option<char> { ... }
fn next_to_while(&mut self, f: fn(_: char) -> bool) -> Option<char> { ... }
fn next_to_load(&mut self) -> char { ... }
fn next_cycle(&mut self) -> char { ... }
fn prev(&mut self) -> Option<char> { ... }
fn next_to_offset_cycle(&mut self, offset: isize) -> char { ... }
}

Required methods

Provided methods

if you’ve never tried len() before, this method will excute len() method.

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

saved pos to current pos.

saved pos to current char start pos.

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
  • if you’ve never tried it before,
  • this method will create Chars Iterator and then
  • consume it to count number of chars.
  • WARNING: isize
  • if you’ve never tried it before,
  • this method will create Chars Iterator and then
  • consume it to count number of chars.

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