Struct core::async_iter::FromIter

source ·
pub struct FromIter<I> { /* private fields */ }
🔬This is a nightly-only experimental API. (async_iter_from_iter #81798)
Expand description

从迭代器创建的异步迭代器。

这个异步迭代器是由 from_iter 函数创建的。 有关更多信息,请参见它的文档。

Trait Implementations§

source§

impl<I: Iterator> AsyncIterator for FromIter<I>

§

type Item = <I as Iterator>::Item

🔬This is a nightly-only experimental API. (async_iterator #79024)
异步迭代器产生的项的类型。
source§

fn poll_next( self: Pin<&mut Self>, _cx: &mut Context<'_> ) -> Poll<Option<Self::Item>>

🔬This is a nightly-only experimental API. (async_iterator #79024)
尝试提取此异步迭代器的下一个值,如果该值尚不可用,则注册当前任务以进行唤醒,如果异步迭代器耗尽,则返回 NoneRead more
source§

fn size_hint(&self) -> (usize, Option<usize>)

🔬This is a nightly-only experimental API. (async_iterator #79024)
返回异步迭代器剩余长度的界限。 Read more
source§

impl<I: Clone> Clone for FromIter<I>

source§

fn clone(&self) -> FromIter<I>

返回值的副本。 Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

source 执行复制分配。 Read more
source§

impl<I: Debug> Debug for FromIter<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化程序格式化该值。 Read more
source§

impl<I> Unpin for FromIter<I>

Auto Trait Implementations§

§

impl<I> RefUnwindSafe for FromIter<I>where I: RefUnwindSafe,

§

impl<I> Send for FromIter<I>where I: Send,

§

impl<I> Sync for FromIter<I>where I: Sync,

§

impl<I> UnwindSafe for FromIter<I>where I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

获取 selfTypeIdRead more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

从拥有的值中一成不变地借用。 Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

从拥有的值中借用。 Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

返回未更改的参数。

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

调用 U::from(self)

也就是说,这种转换是 From<T> for U 实现选择执行的任何操作。

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

发生转换错误时返回的类型。
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

发生转换错误时返回的类型。
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行转换。