pub struct Piece {
pub buffer_type: BufferType,
pub start: usize,
pub byte_length: usize,
pub char_count: usize,
}Expand description
Piece structure: references a fragment in a buffer
Fields§
§buffer_type: BufferTypeBuffer type
start: usizeStart position in the corresponding buffer (byte offset)
byte_length: usizeByte length of the fragment
char_count: usizeCharacter count of the fragment (handles UTF-8 multi-byte characters)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Piece
impl RefUnwindSafe for Piece
impl Send for Piece
impl Sync for Piece
impl Unpin for Piece
impl UnwindSafe for Piece
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