FromRef
docs
This commit is contained in:
parent
48e7fb7047
commit
d74c46bc06
@ -71,7 +71,11 @@ impl<A, E, I: Stream> StreamResultExt<A, E> for Result<(A, I), E> {
|
||||
}
|
||||
}
|
||||
|
||||
/// [`From`] for references (of any lifetime).
|
||||
pub trait FromRef<T: ?Sized>: for<'a> From<&'a T> {
|
||||
/// [`From::from(&'a T)`] but without specific `'a`.
|
||||
///
|
||||
/// [`From::from(&'a T)`]: From::from
|
||||
fn from_ref(value: &T) -> Self {
|
||||
Self::from(value)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user