Expand description
§scsys-core
Welcome the the scsys-core` crate, the foundational library for the scsys.io ecosystem. This crate is primarily focused on establish a set of fundamental types, traits, and utilities that are used throughout the ecosystem. Doing so allows for a natural consistency to emerge across the ecosystem, while further streamlining the development process.
That being said, the general focus of the crate and its feature-gating make it ideally suited for use outside of the ecosystem as well providing useful primitives such as:
Re-exports§
pub use rand;
pub use rand_distr;
Modules§
- error
- id
- Identity
- prelude
- state
- this module implements a generic
State
wrapper and provides several traits to support state management and other stateful workloads. - time
- Time
- types
Macros§
- fmt_
wrapper - Example
- get_
field - 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
- 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 - Linear
Direction - The
LinearDirection
implementation enumerates the three pssoible movements in one-dimensional space, namely:
Traits§
- Error
Kind - this trait is used to denote various error kinds for use throughout the sdk
- Now
- The
Now
trait provides a common creation routines for all datetime implementations. - RawTimestamp
- a private trait used to mark types capable of being uses as a basetype for a
Timestamp
. - 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.
Type Aliases§
- Arcm
- Type alias wrapping a locked, thread-safe structure with a [Mutex] in an [Arc]
- 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
- IOResult
- Type alias for std::io::Result
- 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