pub trait Collect:
Sized
+ Sync
+ 'static { }Expand description
Trait bound corresponding to types that can be iterated by inventory::iter.
This trait cannot be implemented manually. Instead use the collect macro
which expands to an implementation of this trait for the given type.
§Examples
use inventory::Collect;
fn count_plugins<T: Collect>() -> usize {
inventory::iter::<T>.into_iter().count()
}Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
impl Collect for ArchiveKind
impl Collect for BuildTarget
impl Collect for FlamsExtension
impl Collect for SourceFormat
Implementors§
impl<Req, Res> Collect for ServerFnTraitObj<Req, Res>where
Req: 'static,
Res: 'static,
Available on crate feature
ssr only.