Trait AsIndent

Source
pub trait AsIndent {
    // Required method
    fn as_indent(&self) -> &str;
}
Expand description

A prefix usable for indenting prettified JSON data

assert_eq!(4.as_indent(), "    ");
assert_eq!(" -> ".as_indent(), " -> ");

Required Methods§

Source

fn as_indent(&self) -> &str

Borrow self as prefix to use.

Implementations on Foreign Types§

Source§

impl AsIndent for str

Source§

fn as_indent(&self) -> &str

Source§

impl AsIndent for usize

Source§

fn as_indent(&self) -> &str

Source§

impl AsIndent for String

Source§

fn as_indent(&self) -> &str

Source§

impl AsIndent for Wrapping<usize>

Source§

fn as_indent(&self) -> &str

Source§

impl AsIndent for NonZeroUsize

Source§

fn as_indent(&self) -> &str

Source§

impl<T> AsIndent for Pin<T>
where T: Deref, <T as Deref>::Target: AsIndent,

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ToOwned + ?Sized> AsIndent for Cow<'_, T>

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for &T

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for &mut T

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for Box<T>

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for Rc<T>

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for Arc<T>

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for Ref<'_, T>

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for RefMut<'_, T>

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for MutexGuard<'_, T>

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for RwLockReadGuard<'_, T>

Source§

fn as_indent(&self) -> &str

Source§

impl<T: AsIndent + ?Sized> AsIndent for RwLockWriteGuard<'_, T>

Source§

fn as_indent(&self) -> &str

Implementors§