Struct an_rope::RopeSlice [] [src]

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

An immutable borrowed slice of a Rope.

A RopeSlice represents an immutable borrowed slice of some or all the characters in a Rope.

Methods

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

Returns true if this RopeSlice is empty.

Examples

A RopeSlice into an empty rope should be empty:

use an_rope::Rope;
let an_empty_rope = Rope::new();
assert!(an_empty_rope.slice(0..0).is_empty());

A RopeSlice that contains no characters should be empty, even fi the sliced Rope is not empty:

use an_rope::Rope;
let an_rope = Rope::from("a string that is not empty");
assert!(an_rope.slice(0..0).is_empty());

A RopeSlice with characters should not be empty:

use an_rope::Rope;
let an_rope = Rope::from("a string");
assert!(!an_rope.slice(0..5).is_empty());

Trait Implementations

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

Formats the value using the given formatter.

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

Formats the value using the given formatter.

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

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

A rope equals another rope if all the bytes in both are equal.

This method tests for !=.

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

A rope equals another rope if all the bytes in both are equal.

This method tests for !=.

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

A rope equals another rope if all the bytes in both are equal.

This method tests for !=.

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

Converts this RopeSlice into a new Rope

impl<'a> Into<String> for RopeSlice<'a>
[src]

Converts this RopeSlice into a new String