pub struct StringRange { /* private fields */ }
Implementations§
Source§impl StringRange
impl StringRange
pub fn new(start: usize, end: usize) -> Self
pub fn at(pos: usize) -> Self
pub fn between(start: usize, end: usize) -> Self
pub fn encompassing(a: &Self, b: &Self) -> Self
pub fn start(&self) -> usize
pub fn end(&self) -> usize
pub fn get<'a>(&self, reader: &'a str) -> &'a str
pub fn is_empty(&self) -> bool
pub fn length(&self) -> usize
Trait Implementations§
Source§impl Clone for StringRange
impl Clone for StringRange
Source§fn clone(&self) -> StringRange
fn clone(&self) -> StringRange
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StringRange
impl Debug for StringRange
Source§impl Default for StringRange
impl Default for StringRange
Source§fn default() -> StringRange
fn default() -> StringRange
Returns the “default value” for a type. Read more
Source§impl Hash for StringRange
impl Hash for StringRange
Source§impl PartialEq for StringRange
impl PartialEq for StringRange
impl Copy for StringRange
impl Eq for StringRange
impl StructuralPartialEq for StringRange
Auto Trait Implementations§
impl Freeze for StringRange
impl RefUnwindSafe for StringRange
impl Send for StringRange
impl Sync for StringRange
impl Unpin for StringRange
impl UnwindSafe for StringRange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.