pub struct LazyString<F>(/* private fields */)
where
F: Fn(&mut Formatter<'_>) -> Result;Expand description
A struct used to lazily defer string formatting until needed. This is used to implement
lazy_format!: a lazy version of the standard format! macro.
See lazy_format! for usage.
Trait Implementations§
Source§impl<F> Debug for LazyString<F>
impl<F> Debug for LazyString<F>
Auto Trait Implementations§
impl<F> Freeze for LazyString<F>where
F: Freeze,
impl<F> RefUnwindSafe for LazyString<F>where
F: RefUnwindSafe,
impl<F> Send for LazyString<F>where
F: Send,
impl<F> Sync for LazyString<F>where
F: Sync,
impl<F> Unpin for LazyString<F>where
F: Unpin,
impl<F> UnsafeUnpin for LazyString<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for LazyString<F>where
F: UnwindSafe,
Blanket Implementations§
impl<T> AsyncFriendly for T
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more