Skip to main content

AsIndent

Trait AsIndent 

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

A prefix usable for indenting |indent.

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

Required Methods§

Source

fn as_indent(&self) -> &str

Borrow self as prefix to use.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsIndent for NonZeroUsize

Source§

fn as_indent(&self) -> &str

Source§

impl AsIndent for String

Available on crate feature alloc only.
Source§

fn as_indent(&self) -> &str

Source§

impl AsIndent for Wrapping<usize>

Source§

fn as_indent(&self) -> &str

Source§

impl AsIndent for str

Source§

fn as_indent(&self) -> &str

Source§

impl AsIndent for usize

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 Arc<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 MutexGuard<'_, 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 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 RwLockReadGuard<'_, T>

Source§

fn as_indent(&self) -> &str

Source§

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

Source§

fn as_indent(&self) -> &str

Source§

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

Available on crate feature alloc only.
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

Implementors§