pub trait MaybeAsRef<T: ?Sized> {
// Required method
fn maybe_as_ref(&self) -> Option<&T>;
}Expand description
A cheap reference-to-reference conversion that has a possibility to fail.
Required Methods§
Sourcefn maybe_as_ref(&self) -> Option<&T>
fn maybe_as_ref(&self) -> Option<&T>
Performs the conversion.