Struct il2_iltags::tags::ILTagCreatorEngine[][src]

pub struct ILTagCreatorEngine { /* fields omitted */ }
Expand description

This struct implements an engine that maps the ILTagCreators to the associated tag ID. It can be used as a component to implement ILTagFactory trait.

Implementations

Creates a new instance of the ILTagCreatorEngine.

Arguments:

  • strict: Strict mode. If false, unknown tags will be mapped to RawTag instances.

Returns the current strict flag.

Registers a new ILTagCreator.

Arguments:

  • tag_id: The tag id;
  • creator: The new creator;

Returns:

  • Some<Box<dyn ILTagCreator>>: The previously registered creator for the specified id;
  • None: If the id is not associated with a new creator;

Deregisters a ILTagCreator.

Arguments:

  • tag_id: The tag id;

Returns:

  • Some<Box<dyn ILTagCreator>>: The previously registered creator for the specified id;
  • None: If the id is not associated with a new creator;

Creates a new empty tag for the given id. It uses the registered creators to perform the operation.

Arguments:

  • tag_id: The tag id;

Returns:

  • Some<Box<dyn ILTag>>: The new empty tag instance;
  • None: If the tag id is unknown (only if strict mode is enabled);

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

Performs the conversion.

Performs the conversion.

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.