Trait stun_codec::convert::TryAsRef
source · pub trait TryAsRef<T> {
// Required method
fn try_as_ref(&self) -> Option<&T>;
}
Expand description
This trait allows for attempting to a cheap reference-to-reference conversion.
Required Methods§
sourcefn try_as_ref(&self) -> Option<&T>
fn try_as_ref(&self) -> Option<&T>
Attempts to convert self
to a reference to T
.
If it is not possible, this method will return None
.