[−][src]Trait mod_utilities::Unref
Convenience trait to extract a copy of a value referenced in an Option or Result
Examples
The type of the unref of Option<&T> is Option
use mod_engine::util::Unref; let y = 32; let x = Some(&y); assert_eq!(x.unref(), Some(y));
Using unref on a None yields a None
use mod_engine::util::Unref; let z: Option<&i32> = None; assert_eq!(z.unref(), None);
Associated Types
type Target
The inner value type of the container yielded by unref
Required methods
Loading content...Implementations on Foreign Types
impl<'_, T> Unref for Option<&'_ T> where
T: Copy,
[src]
T: Copy,
impl<'_, T> Unref for Option<&'_ mut T> where
T: Copy,
[src]
T: Copy,
impl<'_, R, E> Unref for Result<&'_ R, E> where
R: Copy,
[src]
R: Copy,
impl<'_, R, E> Unref for Result<&'_ mut R, E> where
R: Copy,
[src]
Loading content...
R: Copy,