pub struct SegmentLines<'a> { /* private fields */ }Expand description
Collection of lines (multi-line text).
Implementations§
Source§impl<'a> SegmentLines<'a>
impl<'a> SegmentLines<'a>
Sourcepub fn from_lines(lines: Vec<SegmentLine<'a>>) -> Self
pub fn from_lines(lines: Vec<SegmentLine<'a>>) -> Self
Create from a vector of lines.
Sourcepub fn push(&mut self, line: SegmentLine<'a>)
pub fn push(&mut self, line: SegmentLine<'a>)
Add a line.
Sourcepub fn lines(&self) -> &[SegmentLine<'a>]
pub fn lines(&self) -> &[SegmentLine<'a>]
Get lines as slice.
Sourcepub fn iter(&self) -> impl Iterator<Item = &SegmentLine<'a>>
pub fn iter(&self) -> impl Iterator<Item = &SegmentLine<'a>>
Iterate over lines.
Sourcepub fn into_owned(self) -> SegmentLines<'static>
pub fn into_owned(self) -> SegmentLines<'static>
Convert to owned.
Trait Implementations§
Source§impl<'a> Clone for SegmentLines<'a>
impl<'a> Clone for SegmentLines<'a>
Source§fn clone(&self) -> SegmentLines<'a>
fn clone(&self) -> SegmentLines<'a>
Returns a duplicate 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<'a> Debug for SegmentLines<'a>
impl<'a> Debug for SegmentLines<'a>
Source§impl<'a> Default for SegmentLines<'a>
impl<'a> Default for SegmentLines<'a>
Source§fn default() -> SegmentLines<'a>
fn default() -> SegmentLines<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> IntoIterator for SegmentLines<'a>
impl<'a> IntoIterator for SegmentLines<'a>
Source§impl<'a> PartialEq for SegmentLines<'a>
impl<'a> PartialEq for SegmentLines<'a>
impl<'a> Eq for SegmentLines<'a>
impl<'a> StructuralPartialEq for SegmentLines<'a>
Auto Trait Implementations§
impl<'a> Freeze for SegmentLines<'a>
impl<'a> RefUnwindSafe for SegmentLines<'a>
impl<'a> Send for SegmentLines<'a>
impl<'a> Sync for SegmentLines<'a>
impl<'a> Unpin for SegmentLines<'a>
impl<'a> UnwindSafe for SegmentLines<'a>
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.