[−][src]Enum nnsplit::Split
A splitted text.
Variants
Text(&'a str)
The lowest level of split.
A split which contains one or more smaller splits.
Implementations
impl<'a> Split<'a>
[src]
pub fn text(&self) -> &'a str
[src]
Returns the encompassed text.
pub fn iter(&self) -> impl Iterator<Item = &Split<'a>>
[src]
Iterate over smaller splits.
Panics
- If the Split is a
Split::Text
because the lowest level of split can not be iterated over.
pub fn flatten(&self, level: usize) -> Vec<&str>
[src]
Recursively flatten the split. Returns a vector where each item is the text of the split at the lowest level.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Split<'a>
impl<'a> Send for Split<'a>
impl<'a> Sync for Split<'a>
impl<'a> Unpin for Split<'a>
impl<'a> UnwindSafe for Split<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,