rspace_traits/
lib.rs

1#![crate_name = "rspace_traits"]
2//! Various traits used to establish a solid foundation for defining and manipulating
3//! containers, spaces, fields, and other related abstractions. The core trait, [`RawSpace`],
4//! is a fundamental building block for defining _spaces_ (i.e. containers containing elements
5//! of a specific type). The [`Container`] trait builds upon [`RawSpace`] to provide a more
6//! robust interface for containers and higher-kinded abstractions.
7#![allow(
8    clippy::missing_errors_doc,
9    clippy::missing_safety_doc,
10    clippy::module_inception,
11    clippy::needless_doctest_main,
12    clippy::should_implement_trait,
13    clippy::upper_case_acronyms
14)]
15#![cfg_attr(not(feature = "std"), no_std)]
16#![cfg_attr(feature = "nightly", feature(allocator_api))]
17// compiler check
18#[cfg(not(any(feature = "std", feature = "alloc")))]
19compile_error! { "either the \"std\" or \"alloc\" feature must be enabled" }
20// macros
21#[macro_use]
22pub(crate) mod macros {
23    #[macro_use]
24    pub mod seal;
25}
26// external crates
27#[cfg(feature = "alloc")]
28extern crate alloc;
29// modules
30pub mod container;
31pub mod functor;
32pub mod space;
33pub mod store;
34
35mod impls {
36    mod impl_container;
37    mod impl_space;
38    mod impl_store;
39}
40
41pub mod ops {
42    //! This module provides various operations traits and implementations for musical concepts
43    #[doc(inline)]
44    pub use self::{apply::*, get::*};
45
46    mod apply;
47    mod get;
48}
49// re-exports
50#[doc(inline)]
51pub use self::{container::*, functor::*, ops::*, space::*, store::*};
52// prelude
53#[doc(hidden)]
54pub mod prelude {
55    pub use crate::container::*;
56    pub use crate::functor::*;
57    pub use crate::ops::*;
58    pub use crate::space::*;
59    pub use crate::store::*;
60}