Struct text2::TextSummary
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§
§impl TextSummary
impl TextSummary
pub fn lines_utf16(&self) -> PointUtf16
Trait Implementations§
§impl Add<TextSummary> for TextSummary
impl Add<TextSummary> for TextSummary
§type Output = TextSummary
type Output = TextSummary
The resulting type after applying the
+
operator.§fn add(self, rhs: TextSummary) -> <TextSummary as Add<TextSummary>>::Output
fn add(self, rhs: TextSummary) -> <TextSummary as Add<TextSummary>>::Output
Performs the
+
operation. Read more§impl<'a> AddAssign<&'a TextSummary> for TextSummary
impl<'a> AddAssign<&'a TextSummary> for TextSummary
§fn add_assign(&mut self, other: &'a TextSummary)
fn add_assign(&mut self, other: &'a TextSummary)
Performs the
+=
operation. Read more§impl AddAssign<TextSummary> for TextSummary
impl AddAssign<TextSummary> for TextSummary
§fn add_assign(&mut self, other: TextSummary)
fn add_assign(&mut self, other: TextSummary)
Performs the
+=
operation. Read more§impl Clone for TextSummary
impl Clone for TextSummary
§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 more§impl Debug for TextSummary
impl Debug for TextSummary
§impl Default for TextSummary
impl Default for TextSummary
§fn default() -> TextSummary
fn default() -> TextSummary
Returns the “default value” for a type. Read more
§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
§impl<'a> From<&'a str> for TextSummary
impl<'a> From<&'a str> for TextSummary
§fn from(text: &'a str) -> TextSummary
fn from(text: &'a str) -> TextSummary
Converts to this type from the input type.
§impl PartialEq<TextSummary> for TextSummary
impl PartialEq<TextSummary> for TextSummary
§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 ==
.§impl Summary for TextSummary
impl Summary for TextSummary
type Context = ()
fn add_summary( &mut self, summary: &TextSummary, _: &<TextSummary as Summary>::Context )
§impl TextDimension for TextSummary
impl TextDimension for TextSummary
fn from_text_summary(summary: &TextSummary) -> TextSummary
fn add_assign(&mut self, other: &TextSummary)
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.