Trait noneifempty::NoneIfEmpty [−][src]
pub trait NoneIfEmpty where
Self: Sized, { type Output; fn none_if_empty(self) -> Option<Self::Output>; }
Expand description
Trait for converting an empty T to None
Associated Types
Loading content...Required methods
fn none_if_empty(self) -> Option<Self::Output>
[src]
Implementations on Foreign Types
impl<N: NoneIfEmpty> NoneIfEmpty for Option<N>
[src]
impl<N: NoneIfEmpty> NoneIfEmpty for Option<N>
[src]Automatically implement NoneIfEmpty for Option<T: NoneIfEmpty>
This is basically a flatten
impl<'s> NoneIfEmpty for &'s str
[src]
impl<'s> NoneIfEmpty for &'s str
[src]Converts a &str to None if empty
impl NoneIfEmpty for String
[src]
impl NoneIfEmpty for String
[src]Converts a String to None if empty