Struct textwrap::word_separators::AsciiSpace
source · [−]pub struct AsciiSpace;
Expand description
Find words by splitting on regions of ' '
characters.
Trait Implementations
sourceimpl Clone for AsciiSpace
impl Clone for AsciiSpace
sourcefn clone(&self) -> AsciiSpace
fn clone(&self) -> AsciiSpace
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AsciiSpace
impl Debug for AsciiSpace
sourceimpl Default for AsciiSpace
impl Default for AsciiSpace
sourcefn default() -> AsciiSpace
fn default() -> AsciiSpace
Returns the “default value” for a type. Read more
sourceimpl WordSeparator for AsciiSpace
impl WordSeparator for AsciiSpace
Split line
into words separated by regions of ' '
characters.
Examples
use textwrap::core::Word;
use textwrap::word_separators::{AsciiSpace, WordSeparator};
let words = AsciiSpace.find_words("Hello World!").collect::<Vec<_>>();
assert_eq!(words, vec![Word::from("Hello "),
Word::from("World!")]);
impl Copy for AsciiSpace
Auto Trait Implementations
impl RefUnwindSafe for AsciiSpace
impl Send for AsciiSpace
impl Sync for AsciiSpace
impl Unpin for AsciiSpace
impl UnwindSafe for AsciiSpace
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more