diff --git a/src/lib.rs b/src/lib.rs index 327c5be..b7802af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,9 +5,9 @@ //! [`WritableStream`](crate::WritableStream) and [`TransformStream`](crate::TransformStream). //! It also supports converting from and into [`Stream`]s and [`Sink`]s from the [futures] crate. //! -//! [`Stream`]: https://docs.rs/futures/0.3.18/futures/stream/trait.Stream.html -//! [`Sink`]: https://docs.rs/futures/0.3.18/futures/sink/trait.Sink.html -//! [futures]: https://docs.rs/futures/0.3.18/futures/index.html +//! [`Stream`]: https://docs.rs/futures/0.3.28/futures/stream/trait.Stream.html +//! [`Sink`]: https://docs.rs/futures/0.3.28/futures/sink/trait.Sink.html +//! [futures]: https://docs.rs/futures/0.3.28/futures/index.html pub use readable::ReadableStream; pub use transform::TransformStream; diff --git a/src/readable/byob_reader.rs b/src/readable/byob_reader.rs index 4f90e40..f898cde 100644 --- a/src/readable/byob_reader.rs +++ b/src/readable/byob_reader.rs @@ -189,7 +189,7 @@ impl<'stream> ReadableStreamBYOBReader<'stream> { /// still usable. This allows reading only a few bytes from the `AsyncRead`, while still /// allowing another reader to read the remaining bytes later on. /// - /// [`AsyncRead`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncRead.html + /// [`AsyncRead`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncRead.html #[inline] pub fn into_async_read(self) -> IntoAsyncRead<'stream> { IntoAsyncRead::new(self, false) diff --git a/src/readable/default_reader.rs b/src/readable/default_reader.rs index 15be8f3..3b94964 100644 --- a/src/readable/default_reader.rs +++ b/src/readable/default_reader.rs @@ -125,7 +125,7 @@ impl<'stream> ReadableStreamDefaultReader<'stream> { /// usable. This allows reading only a few chunks from the `Stream`, while still allowing /// another reader to read the remaining chunks later on. /// - /// [`Stream`]: https://docs.rs/futures/0.3.18/futures/stream/trait.Stream.html + /// [`Stream`]: https://docs.rs/futures/0.3.28/futures/stream/trait.Stream.html #[inline] pub fn into_stream(self) -> IntoStream<'stream> { IntoStream::new(self, false) diff --git a/src/readable/into_async_read.rs b/src/readable/into_async_read.rs index cc6d238..35304d5 100644 --- a/src/readable/into_async_read.rs +++ b/src/readable/into_async_read.rs @@ -20,7 +20,7 @@ use super::ReadableStreamBYOBReader; /// When this `AsyncRead` is dropped, it also drops its reader which in turn /// [releases its lock](https://streams.spec.whatwg.org/#release-a-lock). /// -/// [`AsyncRead`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncRead.html +/// [`AsyncRead`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncRead.html #[must_use = "readers do nothing unless polled"] #[derive(Debug)] pub struct IntoAsyncRead<'reader> { diff --git a/src/readable/into_stream.rs b/src/readable/into_stream.rs index 92f57d2..b354220 100644 --- a/src/readable/into_stream.rs +++ b/src/readable/into_stream.rs @@ -16,7 +16,7 @@ use super::ReadableStreamDefaultReader; /// When this `Stream` is dropped, it also drops its reader which in turn /// [releases its lock](https://streams.spec.whatwg.org/#release-a-lock). /// -/// [`Stream`]: https://docs.rs/futures/0.3.18/futures/stream/trait.Stream.html +/// [`Stream`]: https://docs.rs/futures/0.3.28/futures/stream/trait.Stream.html #[must_use = "streams do nothing unless polled"] #[derive(Debug)] pub struct IntoStream<'reader> { diff --git a/src/readable/mod.rs b/src/readable/mod.rs index e2ece84..f507bf9 100644 --- a/src/readable/mod.rs +++ b/src/readable/mod.rs @@ -38,8 +38,8 @@ pub mod sys; /// then they can be created from a Rust [`AsyncRead`] with [`from_async_read`](Self::from_async_read), /// or converted into one with [`into_async_read`](Self::into_async_read). /// -/// [`Stream`]: https://docs.rs/futures/0.3.18/futures/stream/trait.Stream.html -/// [`AsyncRead`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncRead.html +/// [`Stream`]: https://docs.rs/futures/0.3.28/futures/stream/trait.Stream.html +/// [`AsyncRead`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncRead.html #[derive(Debug)] pub struct ReadableStream { raw: sys::ReadableStream, @@ -58,10 +58,10 @@ impl ReadableStream { /// Use [`map`], [`map_ok`] and/or [`map_err`] to convert a stream's items to a `JsValue` /// before passing it to this function. /// - /// [`Stream`]: https://docs.rs/futures/0.3.18/futures/stream/trait.Stream.html - /// [`map`]: https://docs.rs/futures/0.3.18/futures/stream/trait.StreamExt.html#method.map - /// [`map_ok`]: https://docs.rs/futures/0.3.18/futures/stream/trait.TryStreamExt.html#method.map_ok - /// [`map_err`]: https://docs.rs/futures/0.3.18/futures/stream/trait.TryStreamExt.html#method.map_err + /// [`Stream`]: https://docs.rs/futures/0.3.28/futures/stream/trait.Stream.html + /// [`map`]: https://docs.rs/futures/0.3.28/futures/stream/trait.StreamExt.html#method.map + /// [`map_ok`]: https://docs.rs/futures/0.3.28/futures/stream/trait.TryStreamExt.html#method.map_ok + /// [`map_err`]: https://docs.rs/futures/0.3.28/futures/stream/trait.TryStreamExt.html#method.map_err pub fn from_stream(stream: St) -> Self where St: Stream> + 'static, @@ -87,8 +87,8 @@ impl ReadableStream { /// /// **Panics** if readable byte streams are not supported by the browser. /// - /// [`AsyncRead`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncRead.html - /// [AsyncRead::poll_read]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncRead.html#tymethod.poll_read + /// [`AsyncRead`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncRead.html + /// [AsyncRead::poll_read]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncRead.html#tymethod.poll_read // TODO Non-panicking variant? pub fn from_async_read(async_read: R, default_buffer_len: usize) -> Self where @@ -282,10 +282,10 @@ impl ReadableStream { /// **Panics** if the stream is already locked to a reader. For a non-panicking variant, /// use [`try_into_stream`](Self::try_into_stream). /// - /// [`Stream`]: https://docs.rs/futures/0.3.18/futures/stream/trait.Stream.html - /// [`map`]: https://docs.rs/futures/0.3.18/futures/stream/trait.StreamExt.html#method.map - /// [`map_ok`]: https://docs.rs/futures/0.3.18/futures/stream/trait.TryStreamExt.html#method.map_ok - /// [`map_err`]: https://docs.rs/futures/0.3.18/futures/stream/trait.TryStreamExt.html#method.map_err + /// [`Stream`]: https://docs.rs/futures/0.3.28/futures/stream/trait.Stream.html + /// [`map`]: https://docs.rs/futures/0.3.28/futures/stream/trait.StreamExt.html#method.map + /// [`map_ok`]: https://docs.rs/futures/0.3.28/futures/stream/trait.TryStreamExt.html#method.map_ok + /// [`map_err`]: https://docs.rs/futures/0.3.28/futures/stream/trait.TryStreamExt.html#method.map_err #[inline] pub fn into_stream(self) -> IntoStream<'static> { self.try_into_stream() @@ -301,10 +301,10 @@ impl ReadableStream { /// If the stream is already locked to a reader, then this returns an error /// along with the original `ReadableStream`. /// - /// [`Stream`]: https://docs.rs/futures/0.3.18/futures/stream/trait.Stream.html - /// [`map`]: https://docs.rs/futures/0.3.18/futures/stream/trait.StreamExt.html#method.map - /// [`map_ok`]: https://docs.rs/futures/0.3.18/futures/stream/trait.TryStreamExt.html#method.map_ok - /// [`map_err`]: https://docs.rs/futures/0.3.18/futures/stream/trait.TryStreamExt.html#method.map_err + /// [`Stream`]: https://docs.rs/futures/0.3.28/futures/stream/trait.Stream.html + /// [`map`]: https://docs.rs/futures/0.3.28/futures/stream/trait.StreamExt.html#method.map + /// [`map_ok`]: https://docs.rs/futures/0.3.28/futures/stream/trait.TryStreamExt.html#method.map_ok + /// [`map_err`]: https://docs.rs/futures/0.3.28/futures/stream/trait.TryStreamExt.html#method.map_err pub fn try_into_stream(mut self) -> Result, (js_sys::Error, Self)> { let reader = ReadableStreamDefaultReader::new(&mut self).map_err(|err| (err, self))?; Ok(IntoStream::new(reader, true)) @@ -315,7 +315,7 @@ impl ReadableStream { /// **Panics** if the stream is already locked to a reader, or if this stream is not a readable /// byte stream. For a non-panicking variant, use [`try_into_async_read`](Self::try_into_async_read). /// - /// [`AsyncRead`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncRead.html + /// [`AsyncRead`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncRead.html #[inline] pub fn into_async_read(self) -> IntoAsyncRead<'static> { self.try_into_async_read() @@ -327,7 +327,7 @@ impl ReadableStream { /// If the stream is already locked to a reader, or if this stream is not a readable byte /// stream, then this returns an error along with the original `ReadableStream`. /// - /// [`AsyncRead`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncRead.html + /// [`AsyncRead`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncRead.html pub fn try_into_async_read(mut self) -> Result, (js_sys::Error, Self)> { let reader = ReadableStreamBYOBReader::new(&mut self).map_err(|err| (err, self))?; Ok(IntoAsyncRead::new(reader, true)) diff --git a/src/transform/mod.rs b/src/transform/mod.rs index e9599ce..54508c5 100644 --- a/src/transform/mod.rs +++ b/src/transform/mod.rs @@ -16,8 +16,8 @@ pub mod sys; /// using [`into_stream`](super::ReadableStream::into_stream) /// and [`into_sink`](super::WritableStream::into_sink). /// -/// [`Stream`]: https://docs.rs/futures/0.3.18/futures/stream/trait.Stream.html -/// [`Sink`]: https://docs.rs/futures/0.3.18/futures/sink/trait.Sink.html +/// [`Stream`]: https://docs.rs/futures/0.3.28/futures/stream/trait.Stream.html +/// [`Sink`]: https://docs.rs/futures/0.3.28/futures/sink/trait.Sink.html #[derive(Debug)] pub struct TransformStream { raw: sys::TransformStream, diff --git a/src/writable/default_writer.rs b/src/writable/default_writer.rs index 4a25f00..c43be91 100644 --- a/src/writable/default_writer.rs +++ b/src/writable/default_writer.rs @@ -117,7 +117,7 @@ impl<'stream> WritableStreamDefaultWriter<'stream> { /// usable. This allows writing only a few chunks through the `Sink`, while still allowing /// another writer to write more chunks later on. /// - /// [`Sink`]: https://docs.rs/futures/0.3.18/futures/sink/trait.Sink.html + /// [`Sink`]: https://docs.rs/futures/0.3.28/futures/sink/trait.Sink.html #[inline] pub fn into_sink(self) -> IntoSink<'stream> { IntoSink::new(self) @@ -132,7 +132,7 @@ impl<'stream> WritableStreamDefaultWriter<'stream> { /// still usable. This allows writing only a few bytes through the `AsyncWrite`, while still /// allowing another writer to write more bytes later on. /// - /// [`AsyncWrite`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncWrite.html + /// [`AsyncWrite`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncWrite.html #[inline] pub fn into_async_write(self) -> IntoAsyncWrite<'stream> { IntoAsyncWrite::new(self.into_sink()) diff --git a/src/writable/into_async_write.rs b/src/writable/into_async_write.rs index 3e45f6b..08cb1bc 100644 --- a/src/writable/into_async_write.rs +++ b/src/writable/into_async_write.rs @@ -17,7 +17,7 @@ use super::IntoSink; /// When this `AsyncWrite` is dropped, it also drops its writer which in turn /// [releases its lock](https://streams.spec.whatwg.org/#release-a-lock). /// -/// [`AsyncWrite`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncWrite.html +/// [`AsyncWrite`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncWrite.html #[must_use = "writers do nothing unless polled"] #[derive(Debug)] pub struct IntoAsyncWrite<'writer> { diff --git a/src/writable/into_sink.rs b/src/writable/into_sink.rs index a5e928c..7571386 100644 --- a/src/writable/into_sink.rs +++ b/src/writable/into_sink.rs @@ -14,7 +14,7 @@ use super::WritableStreamDefaultWriter; /// When this sink is dropped, it also drops its writer which in turn /// [releases its lock](https://streams.spec.whatwg.org/#release-a-lock). /// -/// [`Sink`]: https://docs.rs/futures/0.3.18/futures/sink/trait.Sink.html +/// [`Sink`]: https://docs.rs/futures/0.3.28/futures/sink/trait.Sink.html #[must_use = "sinks do nothing unless polled"] #[derive(Debug)] pub struct IntoSink<'writer> { diff --git a/src/writable/mod.rs b/src/writable/mod.rs index 32f1038..08ef9b5 100644 --- a/src/writable/mod.rs +++ b/src/writable/mod.rs @@ -25,7 +25,7 @@ pub mod sys; /// They can be converted into a [raw JavaScript stream](sys::WritableStream) with /// [`into_raw`](Self::into_raw), or into a Rust [`Sink`] with [`into_sink`](Self::into_sink). /// -/// [`Sink`]: https://docs.rs/futures/0.3.18/futures/sink/trait.Sink.html +/// [`Sink`]: https://docs.rs/futures/0.3.28/futures/sink/trait.Sink.html #[derive(Debug)] pub struct WritableStream { raw: sys::WritableStream, @@ -44,9 +44,9 @@ impl WritableStream { /// Use [`with`] and/or [`sink_map_err`] to convert a sink's items to a `JsValue` /// before passing it to this function. /// - /// [`Sink`]: https://docs.rs/futures/0.3.18/futures/sink/trait.Sink.html - /// [`with`]: https://docs.rs/futures/0.3.18/futures/sink/trait.SinkExt.html#method.with - /// [`sink_map_err`]: https://docs.rs/futures/0.3.18/futures/sink/trait.SinkExt.html#method.sink_map_err + /// [`Sink`]: https://docs.rs/futures/0.3.28/futures/sink/trait.Sink.html + /// [`with`]: https://docs.rs/futures/0.3.28/futures/sink/trait.SinkExt.html#method.with + /// [`sink_map_err`]: https://docs.rs/futures/0.3.28/futures/sink/trait.SinkExt.html#method.sink_map_err pub fn from_sink(sink: Si) -> Self where Si: Sink + 'static, @@ -126,9 +126,9 @@ impl WritableStream { /// **Panics** if the stream is already locked to a writer. For a non-panicking variant, /// use [`try_into_sink`](Self::try_into_sink). /// - /// [`Sink`]: https://docs.rs/futures/0.3.18/futures/sink/trait.Sink.html - /// [`with`]: https://docs.rs/futures/0.3.18/futures/sink/trait.SinkExt.html#method.with - /// [`sink_map_err`]: https://docs.rs/futures/0.3.18/futures/sink/trait.SinkExt.html#method.sink_map_err + /// [`Sink`]: https://docs.rs/futures/0.3.28/futures/sink/trait.Sink.html + /// [`with`]: https://docs.rs/futures/0.3.28/futures/sink/trait.SinkExt.html#method.with + /// [`sink_map_err`]: https://docs.rs/futures/0.3.28/futures/sink/trait.SinkExt.html#method.sink_map_err #[inline] pub fn into_sink(self) -> IntoSink<'static> { self.try_into_sink() @@ -144,9 +144,9 @@ impl WritableStream { /// If the stream is already locked to a writer, then this returns an error /// along with the original `WritableStream`. /// - /// [`Sink`]: https://docs.rs/futures/0.3.18/futures/sink/trait.Sink.html - /// [`with`]: https://docs.rs/futures/0.3.18/futures/sink/trait.SinkExt.html#method.with - /// [`sink_map_err`]: https://docs.rs/futures/0.3.18/futures/sink/trait.SinkExt.html#method.sink_map_err + /// [`Sink`]: https://docs.rs/futures/0.3.28/futures/sink/trait.Sink.html + /// [`with`]: https://docs.rs/futures/0.3.28/futures/sink/trait.SinkExt.html#method.with + /// [`sink_map_err`]: https://docs.rs/futures/0.3.28/futures/sink/trait.SinkExt.html#method.sink_map_err pub fn try_into_sink(mut self) -> Result, (js_sys::Error, Self)> { let writer = WritableStreamDefaultWriter::new(&mut self).map_err(|err| (err, self))?; Ok(writer.into_sink()) @@ -159,7 +159,7 @@ impl WritableStream { /// **Panics** if the stream is already locked to a writer. For a non-panicking variant, /// use [`try_into_async_write`](Self::try_into_async_write). /// - /// [`AsyncWrite`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncWrite.html + /// [`AsyncWrite`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncWrite.html pub fn into_async_write(self) -> IntoAsyncWrite<'static> { self.try_into_async_write() .expect_throw("already locked to a writer") @@ -172,7 +172,7 @@ impl WritableStream { /// If the stream is already locked to a writer, then this returns an error /// along with the original `WritableStream`. /// - /// [`AsyncWrite`]: https://docs.rs/futures/0.3.18/futures/io/trait.AsyncWrite.html + /// [`AsyncWrite`]: https://docs.rs/futures/0.3.28/futures/io/trait.AsyncWrite.html pub fn try_into_async_write(self) -> Result, (js_sys::Error, Self)> { Ok(IntoAsyncWrite::new(self.try_into_sink()?)) }