Module bytes
Shlex and friends for byte strings.
This is used internally by the outer module, and may be more
convenient if you are working with byte slices ([u8]) or types that are
wrappers around bytes, such as OsStr:
(On Windows, OsStr uses 16 bit wide characters so this will not work.)
Structs
Functions
- join Convenience function that consumes an iterable of words and turns it into a single byte string, quoting words when necessary. Consecutive words will be separated by a single space.
- quote Given a single word, return a string suitable to encode it as a shell argument.
- split Convenience function that consumes the whole byte string at once. Returns None if the input was erroneous.
- try_join Convenience function that consumes an iterable of words and turns it into a single byte string, quoting words when necessary. Consecutive words will be separated by a single space.
- try_quote Given a single word, return a string suitable to encode it as a shell argument.