Expand description
§scsys
Welcome to scsys
, this crate is tasked with providing a generic set of tools for the
scsys.io
ecosystem. It is designed to be a foundational library that
helps establish a sense of consistency between individual efforts while working to reduce
its overall footprint through modularization and feature-gating. These characteristics make
it suitable for use both within the ecosystem and outside of it.
Modules§
- config
- the
config
module implements a set of standardized configuration schemas A collection of common configuration primitives and utilities used throughout the scsys-io ecosystem. - crypto
- cryptographic primitives and utilities implemented for the ecosystem
cryptographic primitives and utilities for the
scsys
ecosystem. - error
- this module implements various error-handling primitives and utilities ths module implements various error-handling primitives and utilities
- id
- this module defines the generic
Id
wrapper and its implementations - prelude
- rand
- Utilities for random number generation
- rand_
distr - Generating random samples from probability distributions.
- state
- this module provides a set of states for state-related workloads (
State
&NState
) this module implements a genericState
wrapper and provides several traits to support state management and other stateful workloads. - time
- a temporal module establishing a core set of time-related primitives and utilities such as
Timestamp
- traits
- this module contains various traits commonly used throughout the scsys ecosystem
- types
- utils
- utilities for working with the scsys ecosystem
Macros§
- fmt_
wrapper - Example
- get_
field - getter
- A procedural macro for generativly creating getter methods; i.e. $field_name() -> &$field_type and $field_name_mut() -> &mut $field_type
- gsw
- The
gsw
macro generates getter and setter methods for the fields of a struct. At the moment, the macro can handle any type; for types that implement theCopy
trait, simply drop the&
to the left of each type. - wrapper
Structs§
- Error
Base - Id
Id
is a generic identifier type that wraps a value of typeT
.- Linear
Direction Iter - An iterator over the variants of LinearDirection
- Stage
Iter - An iterator over the variants of Stage
- State
State
is generic over some typeQ
that implements theRawState
trait.- State
Base StateBase
is an abstract object that allows a particular kind of state to be associated with some generic stateQ
- StdError
- The
StdError
type is a generic error type that is generic over the error kind; this enables us to distinguish between distinctly different error types. - Timestamp
Timestamp
is a generic implementation of a type that represents some point in time.
Enums§
- Core
Error - Event
Stage - An
EventStage
is a generic enumeration that represents the three stages of an event in a system, allowing for the association of a typeT
with each stage. The stages are: - Linear
Direction - The
LinearDirection
implementation enumerates the three pssoible movements in one-dimensional space, namely: - Stage
- Auto-generated discriminant enum variants
Traits§
- Appellation
Appellation
defines a common interface for establishing a solid name for various entities.- Apply
Apply
is a trait that allows for mapping over a reference to a typeT
by applying a functionF
to it, producing a new typeU
. The result is wrapped in a container type defined by the implementor of the trait.- Apply
Mut - The
ApplyMut
trait allows for in-place mapping of a mutable reference to a typeT
- Apply
Once - A the
ApplyOnce
trait is similar to [Map
], but it consumes the instance instead of borrowing it; - AsSlice
AsSlice
is a generic trait for converting a type into a slice of its elements. This is useful for types that can be represented as a contiguous sequence of elements, such as arrays, vectors, or other collections.- AsSlice
Mut AsSliceMut
is a generic trait for converting a type into a mutable slice of its elements.- Container
- The
Container
trait is a higher-level abstraction overRawContainer
. - DType
DType
is a trait designed to provide additional information regarding the type of a particular value.- Decrement
Decrement
defines an interface for decrementing a value.- Decrement
Mut DecrementMut
is a trait describing the ability to decrement a value in place. It is similar toDecrement
, but it allows for mutable access to the value.- Decrement
Ref DecrementRef
is a trait describing the ability to decrement a value by reference.- Displayable
Displayable
simply combines the two major traitscore::fmt::Debug
andcore::fmt::Display
into a single trait. This is useful for types that need to be displayed in a human-readable format, such as in debugging or logging.- Error
Kind - this trait is used to denote various error kinds for use throughout the sdk
- Functor
- The
Functor
trait extends theHKT
trait to provide a way to map over its content(s) using a functionf
that transforms values of typeT
into values of typeU
. - Get
Get
defines an interface for entities that can be accessed by a key; the design is similar to theIndex
trait in the standard library, however, uses theBorrow
trait to allow for more flexible key types.- GetMut
GetMut
defines an interface for entities that can be accessed by a key; the design is similar to theIndexMut
trait in the standard library- HKT
- The
HKT
trait defines an interface for higher-kinded types (HKT). - Increment
Increment
defines an interface for incrementing a value.- Increment
Mut IncrementMut
is similar toIncrement
, but it allows for incrementing a value in place.- Increment
Ref IncrementRef
is similar toIncrement
, but it allows for incrementing a value by reference.- Into
Inner - IntoInner is typically used for basic structures that wrap a single value.
- IsType
- Keyed
Container - Named
- Interface for nameable data-structures
- Now
- The
Now
trait provides a common creation routines for all datetime implementations. - RawContainer
RawContainer
defines a standard interface for all containers that are used to store other entities.- RawTimestamp
- a private trait used to mark types capable of being uses as a basetype for a
Timestamp
. - RawWrapper
- A
RawWrapper
is 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.
- State
Repr - The
StateRepr
trait defines the base type for stateful items, allowing for a generic item type to be associated with the state. - Stateful
Stateful
is a trait establishing a common interface for all types that are state-aware.- Store
- String
Fmt StringFmt
is a trait that provides methods for formatting strings. Note This crate requires thealloc
feature- Symbolic
Symbolic
denotes a type consisting of some single or set of value(s) that can are considered displayable. Essentially, this trait is a wrapper around theDisplayable
trait enabling additional implementations- TypeOf
- TypeTag
- Typically, TypeTag is used for uninitaliziable
enums
with no variants - Wrapper
- The
Wrapper
trait 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.
Type Aliases§
- BoxErr
- A type alias for a
Err
whose generic type is aBox
of a trait object implementingcore::error::Error
. - BoxError
- Type alias for a boxed error with send, sync, and static flags enabled
- BoxResult
- Type alias for the standard result used
- NState
- A type alias for a
StateBase
equipped with aNary
kind of state - Result
- a type alias for a
Result
type pre-configured with the [Error
] type