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
+
1
16
use std:: { any:: Any , cell:: RefCell , future:: Future , panic:: AssertUnwindSafe , pin:: Pin } ;
2
17
3
18
use async_std:: task;
@@ -491,6 +506,10 @@ pub fn into_future(awaitable: &PyAny) -> PyResult<impl Future<Output = PyResult<
491
506
492
507
/// <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
493
508
///
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
+ ///
494
513
/// # Arguments
495
514
/// * `gen` - The Python async generator to be converted
496
515
///
@@ -534,12 +553,6 @@ pub fn into_future(awaitable: &PyAny) -> PyResult<impl Future<Output = PyResult<
534
553
/// # #[cfg(not(all(feature = "unstable-streams", feature = "attributes")))]
535
554
/// # fn main() {}
536
555
/// ```
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.
543
556
#[ cfg( feature = "unstable-streams" ) ]
544
557
pub fn into_stream_v1 < ' p > (
545
558
gen : & ' p PyAny ,
@@ -549,6 +562,10 @@ pub fn into_stream_v1<'p>(
549
562
550
563
/// <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
551
564
///
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
+ ///
552
569
/// # Arguments
553
570
/// * `locals` - The current task locals
554
571
/// * `gen` - The Python async generator to be converted
@@ -596,12 +613,6 @@ pub fn into_stream_v1<'p>(
596
613
/// # #[cfg(not(all(feature = "unstable-streams", feature = "attributes")))]
597
614
/// # fn main() {}
598
615
/// ```
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.
605
616
#[ cfg( feature = "unstable-streams" ) ]
606
617
pub fn into_stream_with_locals_v1 < ' p > (
607
618
locals : TaskLocals ,
@@ -612,6 +623,10 @@ pub fn into_stream_with_locals_v1<'p>(
612
623
613
624
/// <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
614
625
///
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
+ ///
615
630
/// # Arguments
616
631
/// * `locals` - The current task locals
617
632
/// * `gen` - The Python async generator to be converted
@@ -659,12 +674,6 @@ pub fn into_stream_with_locals_v1<'p>(
659
674
/// # #[cfg(not(all(feature = "unstable-streams", feature = "attributes")))]
660
675
/// # fn main() {}
661
676
/// ```
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.
668
677
#[ cfg( feature = "unstable-streams" ) ]
669
678
pub fn into_stream_with_locals_v2 < ' p > (
670
679
locals : TaskLocals ,
@@ -675,6 +684,10 @@ pub fn into_stream_with_locals_v2<'p>(
675
684
676
685
/// <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
677
686
///
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
+ ///
678
691
/// # Arguments
679
692
/// * `gen` - The Python async generator to be converted
680
693
///
@@ -718,10 +731,6 @@ pub fn into_stream_with_locals_v2<'p>(
718
731
/// # #[cfg(not(all(feature = "unstable-streams", feature = "attributes")))]
719
732
/// # fn main() {}
720
733
/// ```
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.
725
734
#[ cfg( feature = "unstable-streams" ) ]
726
735
pub fn into_stream_v2 < ' p > (
727
736
gen : & ' p PyAny ,
0 commit comments