Module il2_iltags::tags[][src]

Expand description

This module contains the implementation of the IL2 ILTags standard.

Implicit vs Explicit tags

This library contains 2 types of tags, the implicit and the explicit tags.

The implicit tags have their value lengths predefined. This allows them to be more compact because they do not not store the size of the values in the tag serialization. Only the standard built-in tags with IDs lower than 16 are defined as such.

All tags with ID greater than 15 are considered explicit. Explicit tags encode all fields and have no such limitations.

Standard vs custom tags

The IL2 ILTags standard defined 2 classes of tags, the standard tags and custom tags.

The standard tags are defined by IL2 ILTags and defines most of basic data types that can be used by all applications. The standard tags are reserved by the standard and should not be redefined by applications in order to avoid conflicts with future versions of the standard. All tags with IDs up to 31 are considered reserved.

The custom tags can be freely defined by the applications and must have the ID greater than 31.

Modules

This is module defines all standard tags and tag factories.

This module contains some utility functions that may help the usage and/or implementation of this library.

Structs

This template struct is used to implement the ILTagCreator trait for all ILTags that also implement Default.

This template struct is used to implement the ILTagCreator trait for all ILTags that also implement DefaultWithId.

This struct implements a raw tag. It can be used to store any non explicit tag.

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.

Enums

Definition of the errors from this package.

Constants

Maximum tag id value for implicit tags.

Maximum tag size that can be handled by this library. It in this version it is set to 512MB.

Maximum tag id value for reserved tags.

Traits

This trait defines a variant of the std::default::Default trait that takes an id as a parameter.

This trait must be implemented by all ILTags on this library. It defines the basic methods for tag identification, serialization and deserialization of values.

This trait must be implemented by all tag creators. A tag creator is used by ILTagCreatorEngine to create new tag instances.

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.

Functions

Deserializes a byte array of a given size.

Deserializes a byte array of a given size into a vector.

Unserializes an ILInt value.

Verifies if a given tag id represents an implicit tag.

Verifies if a given tag id represents a reserved tag.

Serializes a byte array.

Serializes an u64 as an ILInt value.

Downcasts a ILTag to its concrete type as a mutable reference.

Downcasts a ILTag to its concrete type.

Downcasts a ILTag to its concrete type as a mutable reference. It fails if the tag id or the concrete type does not match.

Downcasts a ILTag to its concrete type. It fails if the tag id or the concrete type does not match.

This function converts the tag size as u64 into a usize value. It checks if the tag size falls within the maximum size of a tag that this library accepts.

Type Definitions

A specialized std::result::Result generated by functions and methods from this package.