pub struct Plugin { /* private fields */ }
Expand description

A composition of resource requirements and systems.

A plugin can contain duplicate entries of resources and systems. At the time when the plugin is loaded into the world with World::with_plugin, all resources and systems will be created and will be unique.

Implementations

Add a dependency on a resource that can be created with Default::default().

If this resource does not already exist in the world at the time this plugin is instantiated, it will be inserted into the World.

Add a dependency on a resource that can be created lazily with a closure.

If a resource of this type does not already exist in the world at the time the plugin is instantiated, it will be inserted into the World.

Add a dependency on a resource that must already exist in the World at the time of plugin instantiation.

If this resource does not already exist in the world at the time this plugin is instantiated, adding the plugin will err.

Add a system to the plugin.

Trait Implementations

Returns the “default value” for a type. Read more

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.