Struct ropey::RopeSlice [] [src]

pub struct RopeSlice<'a> { /* fields omitted */ }

An immutable view into part of a Rope.

Methods

impl<'a> RopeSlice<'a>
[src]

[src]

Total number of bytes in the RopeSlice.

[src]

Total number of chars in the RopeSlice.

[src]

Total number of lines in the RopeSlice.

[src]

Returns the line index of the given char.

[src]

Returns the char index of the start of the given line.

[src]

Returns the char at char_idx.

[src]

Returns the line at line_idx.

Note: lines are zero-indexed.

[src]

Returns whether char_idx is a grapheme cluster boundary or not.

[src]

Returns the char index of the grapheme cluster boundary to the left of char_idx.

This excludes any boundary that might be at char_idx itself, unless char_idx is at the beginning of the rope.

[src]

Returns the char index of the grapheme cluster boundary to the right of char_idx.

This excludes any boundary that might be at char_idx itself, unless char_idx is at the end of the rope.

[src]

Returns an immutable slice of the RopeSlice in the char range start..end.

[src]

Creates an iterator over the bytes of the RopeSlice.

[src]

Creates an iterator over the chars of the RopeSlice.

[src]

Creates an iterator over the grapheme clusters of the RopeSlice.

[src]

Creates an iterator over the lines of the RopeSlice.

[src]

Creates an iterator over the chunks of the RopeSlice.

[src]

Returns the entire text of the RopeSlice as a newly allocated String.

[src]

Creates a new Rope from the contents of the RopeSlice.

Trait Implementations

impl<'a> Copy for RopeSlice<'a>
[src]

impl<'a> Clone for RopeSlice<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for RopeSlice<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'a> Display for RopeSlice<'a>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a, 'b> PartialEq<RopeSlice<'b>> for RopeSlice<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, 'b> PartialEq<&'b str> for RopeSlice<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<Rope> for RopeSlice<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.