abi_stable::erased_types

Trait IteratorItemOrDefault

Source
pub trait IteratorItemOrDefault<'borr>: InterfaceType {
    type Item;
}
Expand description

Gets the expected Iterator::Item type for an InterfaceType, defaulting to () if it doesn’t require Iterator to be implemented.

Used by DynTrait’s vtable to give its iterator methods a defaulted return type.

Required Associated Types§

Source

type Item

The iterator item type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'borr, I, Item> IteratorItemOrDefault<'borr> for I
where I: InterfaceType + IteratorItemOrDefaultHelper<'borr, <I as InterfaceType>::Iterator, Item = Item>,

Source§

type Item = Item