Doc: stream feature is needed for wrap_stream and From<File> for Body (#1456)
At least `wrap_stream` it is written in plain text, but adding the visual flag should be better and coherent with `byte_stream` documentation, but nothing is shown for `From<File>` for `Body`. Co-authored-by: kraktus <kraktus@users.noreply.github.com>
This commit is contained in:
@@ -79,6 +79,7 @@ impl Body {
|
|||||||
///
|
///
|
||||||
/// This requires the `stream` feature to be enabled.
|
/// This requires the `stream` feature to be enabled.
|
||||||
#[cfg(feature = "stream")]
|
#[cfg(feature = "stream")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "stream")))]
|
||||||
pub fn wrap_stream<S>(stream: S) -> Body
|
pub fn wrap_stream<S>(stream: S) -> Body
|
||||||
where
|
where
|
||||||
S: futures_core::stream::TryStream + Send + Sync + 'static,
|
S: futures_core::stream::TryStream + Send + Sync + 'static,
|
||||||
@@ -213,6 +214,7 @@ impl From<&'static str> for Body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "stream")]
|
#[cfg(feature = "stream")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "stream")))]
|
||||||
impl From<File> for Body {
|
impl From<File> for Body {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from(file: File) -> Body {
|
fn from(file: File) -> Body {
|
||||||
|
|||||||
Reference in New Issue
Block a user