pub struct DisplayOption<'a, T: Display>(pub &'a Option<T>);Expand description
Implement Display for Option<T> if T is Display.
It outputs a literal string "None" if it is None. Otherwise it invokes the Display
implementation for T.
Tuple Fields§
§0: &'a Option<T>Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for DisplayOption<'a, T>
impl<'a, T> RefUnwindSafe for DisplayOption<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for DisplayOption<'a, T>where
T: Sync,
impl<'a, T> Sync for DisplayOption<'a, T>where
T: Sync,
impl<'a, T> Unpin for DisplayOption<'a, T>
impl<'a, T> UnwindSafe for DisplayOption<'a, T>where
T: RefUnwindSafe,
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