pub enum Quotable<'a> {
Bytes(&'a [u8]),
Text(&'a str),
}Expand description
A string of bytes that can be quoted/escaped.
This is used by many methods in this crate as a generic
Into<Quotable> constraint. Why not accept
AsRef<[u8]> instead? The ergonomics of that approach were not
so good. For example, quoting OsString/OsStr and
PathBuf/Path didn’t work in a natural way.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Quotable<'a>
impl<'a> RefUnwindSafe for Quotable<'a>
impl<'a> Send for Quotable<'a>
impl<'a> Sync for Quotable<'a>
impl<'a> Unpin for Quotable<'a>
impl<'a> UnwindSafe for Quotable<'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