pub type iter<T> = iter<T>;
Expand description
An iterator over plugins registered of a given type.
The value inventory::iter::<T>
is an iterator with element type &'static T
.
There is no guarantee about the order that plugins of the same type are visited by the iterator. They may be visited in any order.
§Examples
use my_flags::Flag;
fn main() {
for flag in inventory::iter::<Flag> {
println!("-{}, --{}", flag.short, flag.name);
}
}
Refer to the crate level documentation for a complete example of instantiating a plugin registry and submitting plugins.
Aliased Type§
pub enum iter<T> {}
Trait Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes