pub struct ParagraphMeta {
pub byte_range: Range<usize>,
pub revision: u64,
}Expand description
Metadata for one paragraph: UTF-8 byte range and revision counter.
Paragraph ranges are half-open. A terminating newline belongs to the
paragraph before it. A nonempty buffer ending in \n has no extra empty
paragraph, while an entirely empty buffer has one 0..0 paragraph.
§Examples
use ailloli_ui_text::ParagraphMeta;
let meta = ParagraphMeta { byte_range: 2..8, revision: 3 };
assert_eq!(meta.byte_range, 2..8);
assert_eq!(meta.revision, 3);Fields§
§byte_range: Range<usize>Half-open UTF-8 byte range in the complete buffer.
revision: u64Wrapping revision assigned when this indexed paragraph was rebuilt.
Trait Implementations§
Source§impl Clone for ParagraphMeta
impl Clone for ParagraphMeta
Source§fn clone(&self) -> ParagraphMeta
fn clone(&self) -> ParagraphMeta
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 ParagraphMeta
impl Debug for ParagraphMeta
Source§impl PartialEq for ParagraphMeta
impl PartialEq for ParagraphMeta
impl Eq for ParagraphMeta
impl StructuralPartialEq for ParagraphMeta
Auto Trait Implementations§
impl Freeze for ParagraphMeta
impl RefUnwindSafe for ParagraphMeta
impl Send for ParagraphMeta
impl Sync for ParagraphMeta
impl Unpin for ParagraphMeta
impl UnwindSafe for ParagraphMeta
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,
§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.