pub struct ChunkCharIndex<'text> {
pub chunk: &'text str,
pub byte_offset: usize,
pub char_offset: usize,
}Expand description
Represents a chunk of text along with its byte and character offsets.
Fields§
§chunk: &'text strThe text of the generated chunk.
byte_offset: usizeThe byte offset of the chunk within the original text.
char_offset: usizeThe character offset of the chunk within the original text.
Trait Implementations§
Source§impl<'text> Clone for ChunkCharIndex<'text>
impl<'text> Clone for ChunkCharIndex<'text>
Source§fn clone(&self) -> ChunkCharIndex<'text>
fn clone(&self) -> ChunkCharIndex<'text>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'text> Copy for ChunkCharIndex<'text>
Source§impl<'text> Debug for ChunkCharIndex<'text>
impl<'text> Debug for ChunkCharIndex<'text>
impl<'text> Eq for ChunkCharIndex<'text>
Source§impl<'text> PartialEq for ChunkCharIndex<'text>
impl<'text> PartialEq for ChunkCharIndex<'text>
Source§fn eq(&self, other: &ChunkCharIndex<'text>) -> bool
fn eq(&self, other: &ChunkCharIndex<'text>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'text> StructuralPartialEq for ChunkCharIndex<'text>
Auto Trait Implementations§
impl<'text> Freeze for ChunkCharIndex<'text>
impl<'text> RefUnwindSafe for ChunkCharIndex<'text>
impl<'text> Send for ChunkCharIndex<'text>
impl<'text> Sync for ChunkCharIndex<'text>
impl<'text> Unpin for ChunkCharIndex<'text>
impl<'text> UnsafeUnpin for ChunkCharIndex<'text>
impl<'text> UnwindSafe for ChunkCharIndex<'text>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more