1+ //! <span class="module-item stab portability" style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"><code>async-std-runtime</code></span> PyO3 Asyncio functions specific to the async-std runtime
2+ //!
3+ //! Items marked with
4+ //! <span
5+ //! class="module-item stab portability"
6+ //! style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
7+ //! ><code>unstable-streams</code></span>
8+ //! are only available when the `unstable-streams` Cargo feature is enabled:
9+ //!
10+ //! ```toml
11+ //! [dependencies.pyo3-asyncio]
12+ //! version = "0.16"
13+ //! features = ["unstable-streams"]
14+ //! ```
15+
116use std:: { any:: Any , cell:: RefCell , future:: Future , panic:: AssertUnwindSafe , pin:: Pin } ;
217
318use async_std:: task;
@@ -491,6 +506,10 @@ pub fn into_future(awaitable: &PyAny) -> PyResult<impl Future<Output = PyResult<
491506
492507/// <span class="module-item stab portability" style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"><code>unstable-streams</code></span> Convert an async generator into a stream
493508///
509+ /// **This API is marked as unstable** and is only available when the
510+ /// `unstable-streams` crate feature is enabled. This comes with no
511+ /// stability guarantees, and could be changed or removed at any time.
512+ ///
494513/// # Arguments
495514/// * `gen` - The Python async generator to be converted
496515///
@@ -534,12 +553,6 @@ pub fn into_future(awaitable: &PyAny) -> PyResult<impl Future<Output = PyResult<
534553/// # #[cfg(not(all(feature = "unstable-streams", feature = "attributes")))]
535554/// # fn main() {}
536555/// ```
537- ///
538- /// # Availability
539- ///
540- /// **This API is marked as unstable** and is only available when the
541- /// `unstable-streams` crate feature is enabled. This comes with no
542- /// stability guarantees, and could be changed or removed at any time.
543556#[ cfg( feature = "unstable-streams" ) ]
544557pub fn into_stream_v1 < ' p > (
545558 gen : & ' p PyAny ,
@@ -549,6 +562,10 @@ pub fn into_stream_v1<'p>(
549562
550563/// <span class="module-item stab portability" style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"><code>unstable-streams</code></span> Convert an async generator into a stream
551564///
565+ /// **This API is marked as unstable** and is only available when the
566+ /// `unstable-streams` crate feature is enabled. This comes with no
567+ /// stability guarantees, and could be changed or removed at any time.
568+ ///
552569/// # Arguments
553570/// * `locals` - The current task locals
554571/// * `gen` - The Python async generator to be converted
@@ -596,12 +613,6 @@ pub fn into_stream_v1<'p>(
596613/// # #[cfg(not(all(feature = "unstable-streams", feature = "attributes")))]
597614/// # fn main() {}
598615/// ```
599- ///
600- /// # Availability
601- ///
602- /// **This API is marked as unstable** and is only available when the
603- /// `unstable-streams` crate feature is enabled. This comes with no
604- /// stability guarantees, and could be changed or removed at any time.
605616#[ cfg( feature = "unstable-streams" ) ]
606617pub fn into_stream_with_locals_v1 < ' p > (
607618 locals : TaskLocals ,
@@ -612,6 +623,10 @@ pub fn into_stream_with_locals_v1<'p>(
612623
613624/// <span class="module-item stab portability" style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"><code>unstable-streams</code></span> Convert an async generator into a stream
614625///
626+ /// **This API is marked as unstable** and is only available when the
627+ /// `unstable-streams` crate feature is enabled. This comes with no
628+ /// stability guarantees, and could be changed or removed at any time.
629+ ///
615630/// # Arguments
616631/// * `locals` - The current task locals
617632/// * `gen` - The Python async generator to be converted
@@ -659,12 +674,6 @@ pub fn into_stream_with_locals_v1<'p>(
659674/// # #[cfg(not(all(feature = "unstable-streams", feature = "attributes")))]
660675/// # fn main() {}
661676/// ```
662- ///
663- /// # Availability
664- ///
665- /// **This API is marked as unstable** and is only available when the
666- /// `unstable-streams` crate feature is enabled. This comes with no
667- /// stability guarantees, and could be changed or removed at any time.
668677#[ cfg( feature = "unstable-streams" ) ]
669678pub fn into_stream_with_locals_v2 < ' p > (
670679 locals : TaskLocals ,
@@ -675,6 +684,10 @@ pub fn into_stream_with_locals_v2<'p>(
675684
676685/// <span class="module-item stab portability" style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"><code>unstable-streams</code></span> Convert an async generator into a stream
677686///
687+ /// **This API is marked as unstable** and is only available when the
688+ /// `unstable-streams` crate feature is enabled. This comes with no
689+ /// stability guarantees, and could be changed or removed at any time.
690+ ///
678691/// # Arguments
679692/// * `gen` - The Python async generator to be converted
680693///
@@ -718,10 +731,6 @@ pub fn into_stream_with_locals_v2<'p>(
718731/// # #[cfg(not(all(feature = "unstable-streams", feature = "attributes")))]
719732/// # fn main() {}
720733/// ```
721- ///
722- /// **This API is marked as unstable** and is only available when the
723- /// `unstable-streams` crate feature is enabled. This comes with no
724- /// stability guarantees, and could be changed or removed at any time.
725734#[ cfg( feature = "unstable-streams" ) ]
726735pub fn into_stream_v2 < ' p > (
727736 gen : & ' p PyAny ,
0 commit comments