datex-core 0.0.14

The DATEX Core Rust implementation
Documentation
1
2
3
4
5
6
7
8
9
10
use core::{async_iter::AsyncIterator, future::poll_fn, pin::Pin};

use crate::prelude::*;
// utility function for async next
pub async fn async_next_pin_box<I>(iter: &mut Pin<Box<I>>) -> Option<I::Item>
where
    I: AsyncIterator + ?Sized,
{
    poll_fn(|cx| iter.as_mut().poll_next(cx)).await
}