Trait il2_iltags::tags::ILTagFactory [−][src]
pub trait ILTagFactory: Send { fn create_tag(&self, tag_id: u64) -> Option<Box<dyn ILTag>>; fn deserialize(&self, reader: &mut dyn Reader) -> Result<Box<dyn ILTag>>; }
Expand description
This trait must be implemented by all tag factories. Factories are used to deserialize tags into the most appropriate concreate implemetation that will handle a given tag id.
Required methods
Creates an empty tag for the given id.
Arguments:
tag_id
: The tag id;
Returns:
- Some(t): A boxed tag that implements the given tag id;
- None: If the tag id does not have a suitable implementation;