state-m 0.6.0

The library implements convenient state distribution and management mechanisms, facilitating collaborative work between components.
Documentation
mod handle;
mod reader;
mod source;
mod state;
mod state_machine;

pub use reader::Reader;
pub use state::*;
pub use state_m_macro::state_tag;
pub use state_machine::*;
use std::{fmt::Debug, hash::Hash};

/// Associate a Key type and a Value type.
pub trait KvAssoc {
    type Value;
}

/// State type needs to implement these traits: Clone, Debug, Default, PartialEq.
pub trait AsState: Clone + Debug + Default + PartialEq {}

impl<T> AsState for T where T: Clone + Debug + Default + PartialEq {}

/// Tag type needs to implement these traits: Clone, Debug, Eq, Hash, Send, Sync.
pub trait AsTag: Clone + Debug + Eq + Hash + Send + Sync {}

impl<T> AsTag for T where T: Clone + Debug + Eq + Hash + Send + Sync {}