Struct Shlex

pub struct Shlex<'a>(/* private field */);

An iterator that takes an input string and splits it into the words using the same syntax as the POSIX shell.

See bytes::Shlex.

Implementations

impl<'a> Shlex<'a>

fn new(in_str: &'a str) -> Self
unsafe fn from_bytes(bytes: Shlex<'a>) -> Self

Safety

The parameter must have been constructed from valid UTF-8.

unsafe fn as_bytes_mut(&mut self) -> &mut Shlex<'a>

Safety

If the returned reference is reassigned, the new bytes::Shlex must have been constructed from valid UTF-8.

Trait Implementations

impl Iterator for Shlex<'_>

type Item = String;
fn next(&mut self) -> Option<String>

impl<'a> Deref for Shlex<'a>

type Target = Shlex<'a>;
fn deref(&self) -> &Self::Target

Auto Trait Implementations

impl<'a> Freeze for Shlex<'a>

impl<'a> RefUnwindSafe for Shlex<'a>

impl<'a> Send for Shlex<'a>

impl<'a> Sync for Shlex<'a>

impl<'a> Unpin for Shlex<'a>

impl<'a> UnsafeUnpin for Shlex<'a>

impl<'a> UnwindSafe for Shlex<'a>

Blanket Implementations

impl<I> IntoIterator for Shlex<'a> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

impl<P, T> Receiver for Shlex<'a> where P: Deref<Target = T> + ?Sized, T: ?Sized,

type Target = T;

impl<T> Any for Shlex<'a> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Shlex<'a> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Shlex<'a> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Shlex<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for Shlex<'a> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Shlex<'a> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Shlex<'a> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>