pub struct EscapeHelper;Expand description
Helpers for string escaping in pretty output.
Implementations§
Source§impl EscapeHelper
impl EscapeHelper
Sourcepub fn escape_str(s: &str) -> String
pub fn escape_str(s: &str) -> String
Escapes \n, \t, \\, and " in s.
Sourcepub fn unescape_str(s: &str) -> String
pub fn unescape_str(s: &str) -> String
Unescapes a string that may contain \\n, \\t, \\\\, \\".
Auto Trait Implementations§
impl Freeze for EscapeHelper
impl RefUnwindSafe for EscapeHelper
impl Send for EscapeHelper
impl Sync for EscapeHelper
impl Unpin for EscapeHelper
impl UnsafeUnpin for EscapeHelper
impl UnwindSafe for EscapeHelper
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