Struct core_extensions::strings::LeftPadder [−][src]
pub struct LeftPadder<'a> { /* fields omitted */ }
This is supported on crate feature
slices
only.Expand description
Add padding to a string in its Display
impl.
Example
use core_extensions::strings::LeftPadder;
assert_eq!(LeftPadder::new("foo\n bar", 0).to_string(), "foo\n bar");
assert_eq!(LeftPadder::new("foo\n bar", 1).to_string(), " foo\n bar");
assert_eq!(LeftPadder::new("foo\n bar", 2).to_string(), " foo\n bar");
assert_eq!(LeftPadder::new("foo\n bar", 4).to_string(), " foo\n bar");
Implementations
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for LeftPadder<'a>
impl<'a> Send for LeftPadder<'a>
impl<'a> Sync for LeftPadder<'a>
impl<'a> Unpin for LeftPadder<'a>
impl<'a> UnwindSafe for LeftPadder<'a>
Blanket Implementations
This is supported on crate feature
phantom
only.Gets a PhantomData<fn() -> Self>
, a covariant PhantomData
.
This is supported on crate feature
phantom
only.Gets a PhantomData<fn(Self)>
, a contravariant PhantomData
.
This is supported on crate feature
phantom
only.Gets a PhantomData<fn(Self) -> Self>
, an invariant PhantomData
.
This is supported on crate feature
phantom
only.Constructs a PhantomData<fn() -> T>
, a covariant PhantomData
. Read more
This is supported on crate feature
phantom
only.Gets a PhantomData<fn(Self)>
, a contravariant PhantomData
. Read more
This is supported on crate feature
phantom
only.Gets a PhantomData<fn(Self) -> Self>
, an invariant PhantomData
. Read more
Mutably borrows from an owned value. Read more
This is supported on crate feature
callable
only.For calling CallRef::ref_call_
,
with the ability to specify the types of the arguments.. Read more
This is supported on crate feature
callable
only.For calling CallMut::mut_call_
,
with the ability to specify the types of the arguments.. Read more