Expand description
A collection of useful traits designed to be used throughout the ecosystem.
Modules§
- cont
- this module implements a set of traits used to establish a common interface for containers and other generic storage types.
- convert
- dtype
- named
- ops
- string
- symbolic
- toggle
- wrapper
Traits§
- Adjust
- Appellation
- AsSlice
- AsSlice
Mut - Container
- The
Containertrait is a higher-level abstraction overRawContainer. - Context
- DType
DTypeis a trait designed to provide additional information regarding the type of a particular value.- Decrement
Decrementis a trait describing the ability to decrement a value.- Displayable
Displayablesimply combines the two major traitscore::fmt::Debugandcore::fmt::Displayinto a single trait. This is useful for types that need to be displayed in a human-readable format, such as in debugging or logging.- Functor
- The
Functortrait extends theHKTtrait to provide a way to map over its content(s) using a functionfthat transforms values of typeTinto values of typeU. - Get
Getdefines an interface for entities that can be accessed by a key; the design is similar to theIndextrait in the standard library, however, uses theBorrowtrait to allow for more flexible key types.- GetMut
GetMutdefines an interface for entities that can be accessed by a key; the design is similar to theIndexMuttrait in the standard library- HKT
- The
HKTtrait defines an interface for higher-kinded types (HKT). - Increment
- Into
Inner - IntoInner is typically used for basic structures that wrap a single value.
- IsType
- Keyed
Container - Map
Mapis a trait that allows for mapping over a reference to a typeTby applying a functionFto it, producing a new typeU. The result is wrapped in a container type defined by the implementor of the trait.- MapInplace
- MapOnce
- A the
MapOncetrait is similar toMap, but it consumes the instance instead of borrowing it; - Mapper
- Named
- Interface for nameable data-structures
- RawContainer
RawContainerdefines a standard interface for all containers that are used to store other entities.- RawWrapper
- A
RawWrapperis the base trait defining all so-called “wrapper” types. - Remove
Fnl - This trait defines a method for removing the first and last entries within an entity.
- Store
- String
Fmt StringFmtis a trait that provides methods for formatting strings. Note This crate requires theallocfeature- Symbolic
Symbolicdenotes a type consisting of some single or set of value(s) that can are considered displayable. Essentially, this trait is a wrapper around theDisplayabletrait enabling additional implementations- TypeOf
- TypeTag
- Typically, TypeTag is used for uninitaliziable
enumswith no variants - Wrapper
- The
Wrappertrait is used to establish a common interface for all simplemented structures that “wrap” a single value. Essentially, any type capable of implementing#[repr(transparent)]can be considered a wrapper. - Wrapper
Ext WrapperExtis an automatically implemented trait extending theWrappertrait with additional