eryon-mem 0.0.4

this crate implements the memory-related aspects of the eryon framework
/*
    Appellation: eryon-mem <library>
    Contrib: @FL03
*/
//! # eryon-mem
//!
//! This crate focuses on implementing the topological memory mechanism for the substrate and
//! its constituents
//!
#![allow(
    clippy::missing_safety_doc,
    clippy::module_inception,
    clippy::needless_doctest_main,
    clippy::upper_case_acronyms
)]
#![cfg_attr(not(feature = "std"), no_std)]
#![crate_type = "lib"]

#[cfg(feature = "alloc")]
extern crate alloc;

extern crate eryon_core as eryon;

#[cfg(not(any(feature = "alloc", feature = "std")))]
compile_error!("Either feature `alloc` or `std` must be enabled.");

#[doc(inline)]
pub use self::{
    block::Block,
    error::*,
    features::prelude::*,
    ledger::TopoLedger,
    transactions::{Transaction, TransactionKind},
    types::prelude::*,
};

#[macro_use]
pub(crate) mod macros {
    #[macro_use]
    pub mod seal;
}

pub mod block;
/// this module contains the [`MemoryError`] implementation
pub mod error;
pub mod features;
pub mod ledger;
/// defines the [`Transaction`] and provides supporting types and traits
pub mod transactions;

pub mod types {
    //! the `types` module implements various types used within the topological memory system
    #[doc(inline)]
    pub use self::prelude::*;

    /// this module provides the [`MemoryPosition`] implementation for tracking the current
    /// position of a feature within the topological memory.
    pub mod position;
    /// this module provides the [`MemoryProperties`] implementation for managing properties of
    /// features within the topological memory.
    pub mod properties;
    /// this module provides the [`MemoryStatistics`] implementation for gathering statistics
    /// about the memory system
    pub mod statistics;

    pub(crate) mod prelude {
        #[doc(inline)]
        pub use super::position::*;
        #[doc(inline)]
        pub use super::properties::*;
        #[doc(inline)]
        pub use super::statistics::*;
    }
}

pub mod prelude {
    #[doc(no_inline)]
    pub use crate::error::*;

    #[doc(no_inline)]
    pub use crate::block::*;
    #[doc(no_inline)]
    pub use crate::features::prelude::*;
    #[doc(no_inline)]
    pub use crate::ledger::prelude::*;
    #[doc(no_inline)]
    pub use crate::transactions::prelude::*;
    #[doc(no_inline)]
    pub use crate::types::prelude::*;
}