diff --git a/src/mode/stream.rs b/src/mode/stream.rs index fff0f17..7b6e876 100644 --- a/src/mode/stream.rs +++ b/src/mode/stream.rs @@ -71,7 +71,11 @@ impl StreamResultExt for Result<(A, I), E> { } } +/// [`From`] for references (of any lifetime). pub trait FromRef: 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) }