# inventory::Collect - Rust
Trait bound corresponding to types that can be iterated by inventory::iter.
Keywords: rust, rustlang, rust-lang, Collect

# Trait inventory::Collect [−] [src]

    pub trait Collect: Sized + 'static { }

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()
    }

## Implementors

Loading content...