struct ParenHelper<T> {
paren: bool,
wrapped: T,
}
Expand description
Helper type to display either foo
or (foo)
.
Fields§
§paren: bool
true
if parentheses are needed.
wrapped: T
The main thing to display.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ParenHelper<T>where
T: Freeze,
impl<T> RefUnwindSafe for ParenHelper<T>where
T: RefUnwindSafe,
impl<T> Send for ParenHelper<T>where
T: Send,
impl<T> Sync for ParenHelper<T>where
T: Sync,
impl<T> Unpin for ParenHelper<T>where
T: Unpin,
impl<T> UnwindSafe for ParenHelper<T>where
T: UnwindSafe,
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
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 moreLayout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.