pub struct ChunkBuilder { /* private fields */ }Expand description
Builder for creating chunks with fluent API.
Implementations§
Source§impl ChunkBuilder
impl ChunkBuilder
Sourcepub const fn byte_range(self, range: Range<usize>) -> Self
pub const fn byte_range(self, range: Range<usize>) -> Self
Sets the byte range.
Sourcepub const fn token_count(self, count: usize) -> Self
pub const fn token_count(self, count: usize) -> Self
Sets the token count.
Sourcepub const fn line_range(self, range: Range<usize>) -> Self
pub const fn line_range(self, range: Range<usize>) -> Self
Sets the line range.
Sourcepub const fn has_overlap(self, has_overlap: bool) -> Self
pub const fn has_overlap(self, has_overlap: bool) -> Self
Sets whether this chunk has overlap.
Trait Implementations§
Source§impl Debug for ChunkBuilder
impl Debug for ChunkBuilder
Source§impl Default for ChunkBuilder
impl Default for ChunkBuilder
Source§fn default() -> ChunkBuilder
fn default() -> ChunkBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChunkBuilder
impl RefUnwindSafe for ChunkBuilder
impl Send for ChunkBuilder
impl Sync for ChunkBuilder
impl Unpin for ChunkBuilder
impl UnwindSafe for ChunkBuilder
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> 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