intrepid-core 0.3.0

Manage complex async business logic with ease
Documentation
#![deny(missing_docs, rust_2018_idioms, nonstandard_style, future_incompatible)]
#![doc = include_str!("README.md")]

use tower::util::BoxCloneService;

mod action;
mod axum;
mod context;
mod errors;
mod extract;
mod frame;
mod future;
mod layer;
mod pattern;
mod routing;
mod system;

pub use action::*;
pub use axum::*;
pub use context::*;
pub use errors::Error;
pub use extract::*;
pub use frame::*;
pub use future::*;
pub use pattern::*;
pub use routing::*;
pub use system::{StatefulSystem, StatelessSystem, System};

/// A convenience type alias for a service that takes an `Frame` and returns a `Vec<Frame>`.
pub type ActionService = BoxCloneService<Frame, Frame, Error>;

/// A collection of actions that can be invoked.
pub type Actions<State> = Vec<BoxedAction<State>>;

/// A single boxed action that can be invoked.
pub type BoxedAction<State> = Box<dyn Actionable<State>>;

/// The result type for this crate.
pub type Result<T> = std::result::Result<T, Error>;