Struct rope2::TextSummary
source · pub struct TextSummary {
pub len: usize,
pub len_utf16: OffsetUtf16,
pub lines: Point,
pub first_line_chars: u32,
pub last_line_chars: u32,
pub last_line_len_utf16: u32,
pub longest_row: u32,
pub longest_row_chars: u32,
}
Fields§
§len: usize
§len_utf16: OffsetUtf16
§lines: Point
§first_line_chars: u32
§last_line_chars: u32
§last_line_len_utf16: u32
§longest_row: u32
§longest_row_chars: u32
Implementations§
source§impl TextSummary
impl TextSummary
pub fn lines_utf16(&self) -> PointUtf16
Trait Implementations§
source§impl Add<TextSummary> for TextSummary
impl Add<TextSummary> for TextSummary
source§impl<'a> AddAssign<&'a TextSummary> for TextSummary
impl<'a> AddAssign<&'a TextSummary> for TextSummary
source§fn add_assign(&mut self, other: &'a Self)
fn add_assign(&mut self, other: &'a Self)
Performs the
+=
operation. Read moresource§impl AddAssign<TextSummary> for TextSummary
impl AddAssign<TextSummary> for TextSummary
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl Clone for TextSummary
impl Clone for TextSummary
source§fn clone(&self) -> TextSummary
fn clone(&self) -> TextSummary
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 TextSummary
impl Debug for TextSummary
source§impl Default for TextSummary
impl Default for TextSummary
source§fn default() -> TextSummary
fn default() -> TextSummary
Returns the “default value” for a type. Read more
source§impl<'a> Dimension<'a, ChunkSummary> for TextSummary
impl<'a> Dimension<'a, ChunkSummary> for TextSummary
fn add_summary(&mut self, summary: &'a ChunkSummary, _: &())
fn from_summary(summary: &'a S, cx: &<S as Summary>::Context) -> Self
source§impl<'a> From<&'a str> for TextSummary
impl<'a> From<&'a str> for TextSummary
source§impl PartialEq<TextSummary> for TextSummary
impl PartialEq<TextSummary> for TextSummary
source§fn eq(&self, other: &TextSummary) -> bool
fn eq(&self, other: &TextSummary) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Summary for TextSummary
impl Summary for TextSummary
source§impl TextDimension for TextSummary
impl TextDimension for TextSummary
fn from_text_summary(summary: &TextSummary) -> Self
fn add_assign(&mut self, other: &Self)
impl Eq for TextSummary
impl StructuralEq for TextSummary
impl StructuralPartialEq for TextSummary
Auto Trait Implementations§
impl RefUnwindSafe for TextSummary
impl Send for TextSummary
impl Sync for TextSummary
impl Unpin for TextSummary
impl UnwindSafe for TextSummary
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<'a, T> Dimension<'a, T> for Twhere
T: Summary,
impl<'a, T> Dimension<'a, T> for Twhere T: Summary,
fn add_summary(&mut self, summary: &'a T, cx: &<T as Summary>::Context)
fn from_summary(summary: &'a S, cx: &<S as Summary>::Context) -> Self
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.