Crate mingl

Source
Expand description

§mingl

Agnostic set of tools for abstract rendering backend.

§Implemented Features

  • Data type convertion into Vector:

    • f32.
    • i8/16/32.
    • u8/16/32.
    • 1D array.
    • 2D array.
  • Data type convertion into byte slices:

    • Arrays.
    • Vec< T >.
  • Orbital camera controler.

  • Object model reporter.

Modules§

_private_phf_reexport_for_macro_if_phf_feature
Rust-PHF is a library to generate efficient lookup tables at compile time using perfect hash functions.
additional_attributes
Documentation for Additional Attributes
buffer
Buffer-related.
clone_dyn
data_type
Descriptors of primitive data types.
derive
Derives.
error
Errors handling.
exposed
Exposed namespace of the module.
former
mem
Memory-related entities.
nd
Multi-dimensional math.
orphan
Orphan namespace of the module.
own
Own namespace of the module.
prelude
Prelude to use essentials: use my_module::prelude::*.
thiserror
githubcrates-iodocs-rs

Macros§

debug_assert_id
Macro asserts that two expressions are identical to each other. Unlike std::assert_eq it is removed from a release build.
debug_assert_identical
Macro asserts that two expressions are identical to each other. Unlike std::assert_eq it is removed from a release build. Alias of debug_assert_id.
debug_assert_ni
Macro asserts that two expressions are not identical to each other. Unlike std::assert_eq it is removed from a release build.
debug_assert_not_identical
Macro asserts that two expressions are not identical to each other. Unlike std::assert_eq it is removed from a release build.
err
Macro to generate an error descriptor.
from
Variadic constructor.
mod_interface
Protocol of modularity unifying interface of a module and introducing layers.
return_err
Macro to return an Err( error ) generating error descriptor.

Structs§

BTreeMapDefinition
Represents the formation definition for a hash map-like collection within the former framework.
BTreeMapDefinitionTypes
Holds the generic parameters for the BTreeMapDefinition.
BTreeSetDefinition
Represents the formation definition for a binary tree set-like collection within the former framework.
BTreeSetDefinitionTypes
Holds the generic parameters for the BTreeSetDefinition.
BasicError
baic implementation of generic BasicError
BinaryHeapDefinition
Represents the formation definition for a binary heap-like collection within the former framework.
BinaryHeapDefinitionTypes
Holds the generic parameters for the BinaryHeapDefinition.
CollectionFormer
A builder structure for constructing collections with a fluent and flexible interface.
FormingEndClosure
A wrapper around a closure to be used as a FormingEnd.
HashMapDefinition
Represents the formation definition for a hash map-like collection within the former framework.
HashMapDefinitionTypes
Holds the generic parameters for the HashMapDefinition.
HashSetDefinition
Represents the formation definition for a hash set-like collection within the former framework.
HashSetDefinitionTypes
Holds the generic parameters for the HashSetDefinition.
LinkedListDefinition
Represents the formation definition for a list-like collection within the former framework.
LinkedListDefinitionTypes
Holds the generic parameters for the LinkedListDefinition.
NoEnd
A placeholder FormingEnd used when no end operation is required or applicable.
ReturnPreformed
A FormingEnd implementation that directly returns the formed collection as the final product of the forming process.
ReturnStorage
A FormingEnd implementation that returns the storage itself as the formed entity, disregarding any contextual data.
VecDequeDefinition
Represents the formation definition for a vector deque-like collection within the former framework.
VecDequeDefinitionTypes
Holds the generic parameters for the VecDequeDefinition.
VectorDataType
Represents a data type with a specified size.
VectorDefinition
Represents the formation definition for a vector-like collection within the former framework.
VectorDefinitionTypes
Holds the generic parameters for the VectorDefinition.

Enums§

DataType
Enum representing basic WebGL data types.
ParseError
The ParseError enum is a collection of all the possible reasons an enum can fail to parse from a string.

Traits§

Add
The addition operator +.
AddAssign
The addition assignment operator +=.
AsBytes
Trait for converting data to byte slices.
AsStaticRefDeprecated
A cheap reference-to-reference conversion. Used to convert a value to a reference value with 'static lifetime within generic code.
Assign
Provides a generic interface for setting a component of a certain type on an object.
AssignWithType
The AssignWithType trait provides a mechanism to set a component on an object, utilizing the type information explicitly. This trait extends the functionality of Assign by allowing implementers to specify the component’s type at the method call site, enhancing expressiveness in code that manipulates object states.
BTreeMapExt
Provides an extension method for hash maps to facilitate the use of the builder pattern.
BTreeSetExt
Provides an extension method for binary tree sets to facilitate the use of the builder pattern.
BinaryHeapExt
Provides an extension method for binary heaps to facilitate the use of the builder pattern.
CloneDyn
A trait to upcast a clonable entity and clone it. It’s implemented for all entities which can be cloned.
Collection
Represents a collection by defining the types of entries and values it handles.
CollectionAdd
Provides functionality to add individual entries to a collection.
CollectionAssign
Defines the capability to replace all entries in a collection with a new set of entries.
CollectionValToEntry
Provides a mechanism for transforming a value back into a collection-specific entry format.
Div
The division operator /.
DivAssign
The division assignment operator /=.
EntityToDefinition
Maps a type of entity to its corresponding former definition. This trait provides a linkage between the entity and its definition, allowing the formation logic to understand what definition to apply during the formation process.
EntityToDefinitionTypes
Provides a mapping between a type of entity and its associated formation type definitions.
EntityToFormer
Maps a type of entity to its corresponding former. This trait binds an entity type to a specific former, facilitating the use of custom formers in complex formation scenarios.
EntityToStorage
Maps a type of entity to its storage type. This trait defines what storage structure is used to hold the interim state of an entity during its formation.
EntryToVal
Facilitates the conversion of collection entries to their corresponding value representations.
EnumCount
A trait for capturing the number of variants in Enum. This trait can be autoderived by strum_macros.
EnumMessage
Associates additional pieces of information with an Enum. This can be autoimplemented by deriving EnumMessage and annotating your variants with #[strum(message="...")].
EnumProperty
EnumProperty is a trait that makes it possible to store additional information with enum variants. This trait is designed to be used with the macro of the same name in the strum_macros crate. Currently, the only string literals are supported in attributes, the other methods will be implemented as additional attribute types become stabilized.
ErrWith
This trait allows adding extra context or information to an error, creating a tuple of the additional context and the original error. This is particularly useful for error handling when you want to include more details in the error without losing the original error value.
Error
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.
ErrorTrait
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.
FormerBegin
A trait for initiating a structured subforming process with contextual and intermediary storage linkage.
FormerDefinition
Expands on FormerDefinitionTypes by incorporating an ending mechanism for the formation process. This trait connects the formation types with a specific endpoint, defining how the formation process concludes, including any necessary transformations or validations.
FormerDefinitionTypes
Defines the fundamental components involved in the formation of an entity. This trait specifies the types of storage, the formed entity, and the context used during the formation process.
FormerMutator
Provides a mechanism for mutating the context and storage just before the forming process is completed.
FormingEnd
Defines a handler for the end of a subforming process, enabling the return of the original context.
From1
Constructor with single argument.
From2
Constructor with two arguments.
From3
Constructor with three arguments.
HashMapExt
Provides an extension method for hash maps to facilitate the use of the builder pattern.
HashSetExt
Provides an extension method for HashSet to facilitate the use of the builder pattern.
Into
A value-to-value conversion that consumes the input value. The opposite of From.
Into1
value-to-value conversion that consumes the input value. Change left and rught, but keep semantic of `From1``.
IntoEnumIterator
This trait designates that an Enum can be iterated over. It can be auto generated using strum_macros on your behalf.
IntoIterator
Conversion into an Iterator.
IntoVectorDataType
Trait for converting types into VectorDataType.
LinkedListExt
Provides an extension method for lists to facilitate the use of the builder pattern.
Mul
The multiplication operator *.
MulAssign
The multiplication assignment operator *=.
OptionExt
Extension trait to provide a method for setting a component on an Option<Self> if the Option is currently None. If the Option is Some, the method will delegate to the Assign trait’s assign method.
Pod
Marker trait for “plain old data”.
Storage
Defines the storage interface for entities being constructed using a forming pattern.
StoragePreform
Provides a mechanism to finalize the forming process by converting storage into its final formed state.
Sub
The subtraction operator -.
SubAssign
The subtraction assignment operator -=.
Sum
Trait to represent types that can be created by summing up an iterator.
TryInto
An attempted conversion that consumes self, which may or may not be expensive.
ValToEntry
Facilitates the conversion of values back into entries for specific collection types.
VariantIterator
VariantMetadata
VariantNames
A trait for retrieving the names of each variant in Enum. This trait can be autoderived by strum_macros.
VecDequeExt
Provides an extension method for vector deques to facilitate the use of the builder pattern.
VecExt
Provides an extension method for vectors to facilitate the use of the builder pattern.

Functions§

clone
True clone which is applicable not only to clonable entities, but to trait objects implementing CloneDyn.
clone_into_box
Clone boxed dyn.

Type Aliases§

BTreeMapFormer
Provides a streamlined builder interface for constructing hash map-like collections.
BTreeSetFormer
Provides a streamlined builder interface for constructing binary tree set-like collections.
BinaryHeapFormer
Provides a streamlined builder interface for constructing binary heap-like collections.
HashMapFormer
Provides a streamlined builder interface for constructing hash map-like collections.
HashSetFormer
Provides a concise alias for CollectionFormer configured specifically for HashSet-like collections.
LinkedListFormer
Provides a streamlined builder interface for constructing list-like collections.
ResultWithReport
A type alias for a Result that contains an error which is a tuple of a report and an original error.
VecDequeFormer
Provides a streamlined builder interface for constructing vector deque-like collections.
VectorFormer
Provides a streamlined builder interface for constructing vector-like collections.

Attribute Macros§

clone_dyn
Derive macro to generate former for a structure. Former is variation of Builder Pattern.
phantom
Provides an automatic PhantomData field for a struct based on its generic types.

Derive Macros§

Add
What #[derive(Add)] generates
AddAssign
What #[derive(AddAssign)] generates
AsMut
Derive macro to implement AsMut when-ever it’s possible to do automatically.
AsRef
Derive macro to implement AsRef when-ever it’s possible to do automatically.
AsRefStr
Converts enum variants to &'static str.
AsStaticStr
Assign
Derives the Assign trait for struct fields, allowing each field to be set with a value that can be converted into the field’s type.
ComponentFrom
Macro to implement From for each component (field) of a structure. This macro simplifies the creation of From trait implementations for struct fields, enabling easy conversion from a struct reference to its field types.
ComponentsAssign
Derives the ComponentsAssign trait for a struct, enabling components_assign which set all fields at once.
Constructor
What #[derive(Constructor)] generates
Deref
Derive macro to implement Deref when-ever it’s possible to do automatically.
DerefMut
Derive macro to implement Deref when-ever it’s possible to do automatically.
Display
Div
What #[derive(Mul)] generates
DivAssign
What #[derive(MulAssign)] generates
EnumCount
Add a constant usize equal to the number of variants.
EnumDiscriminants
Generate a new type with only the discriminant names.
EnumIs
Generated is_*() methods for each variant. E.g. Color.is_red().
EnumIter
Creates a new type that iterates of the variants of an enum.
EnumMessage
Add a verbose message to an enum variant.
EnumProperty
Add custom properties to enum variants.
EnumString
Converts strings to enum variants based on their name.
EnumTryAs
Generated try_as_*() methods for all tuple-style variants. E.g. Message.try_as_write().
EnumVariantNames
Implements Strum::VariantNames which adds an associated constant VARIANTS which is an array of discriminant names.
Error
Using #[derive(Error)]
Former
Derive macro for generating a Former struct, applying a Builder Pattern to the annotated struct.
From
Provides an automatic From implementation for struct wrapping a single value.
FromComponents
A procedural macro to automatically derive the From<T> trait implementation for a struct, enabling instances of one type to be converted from instances of another type.
FromRepr
Add a function to enum that allows accessing variants by its discriminant
FromStr
Index
Provides an automatic Index trait implementation when-ever it’s possible.
IndexMut
Provides an automatic IndexMut trait implementation when-ever it’s possible.
InnerFrom
Derive macro to implement From converting outer type into inner when-ever it’s possible to do automatically.
Into
What #[derive(Into)] generates
IntoIterator
Using #[derive(IntoIterator)]
IntoStaticStr
Implements From<MyEnum> for &'static str on an enum.
IsVariant
What #[derive(IsVariant)] generates
Mul
What #[derive(Mul)] generates
MulAssign
What #[derive(MulAssign)] generates
New
Provides an automatic new implementation for struct wrapping a single value.
Not
Provides an automatic Not trait implementation for struct.
Pod
Derive the Pod trait for a struct
Sub
What #[derive(Add)] generates
SubAssign
What #[derive(AddAssign)] generates
Sum
Using #[derive(Sum)]
ToString
implements std::string::ToString on an enum
TryInto
What #[derive(TryInto)] generates
Unwrap
What #[derive(Unwrap)] generates
VariadicFrom
The derive_variadic_from macro is designed to provide a way to implement the From-like traits for structs with a variable number of fields, allowing them to be constructed from tuples of different lengths or from individual arguments. This functionality is particularly useful for creating flexible constructors that enable different methods of instantiation for a struct. By automating the implementation of traits, this macro reduces boilerplate code and enhances code readability and maintainability.