starlane 0.3.21

Starlane -- An Orchestration and Infrastructure Framework for WebAssembly Components (https://starlane.io) This packaged manages `HyperSpace` which provides infrastructure for `Space` Apis (WebAssembly & external programs meant to provide custom behaviors in Starlane), This package references the `starlane-space` package and reuses of it to run the infrastructure and it also contains mechanisms (Drivers) for extending the Starlane Type system
Documentation
use crate::space::err::SpaceErr;
use thiserror::Error;

/// Can be a long-running goal being executed consists of Tasks comprised of Steps
pub trait Operation
where
    Self: Sized,
{
    fn new<C>(config: &C) -> Result<Self, OpErr>;
}

pub trait OperationConfig
where
    Self::Operation: Operation,
{
    type Operation;
}

pub trait Task {
    fn name() -> &'static str;

    fn desc() -> &'static str;
}

pub trait Step {
    fn name() -> &'static str;
    fn desc() -> &'static str;
}

#[derive(Clone, Debug, Error)]
pub enum OpErr {
    #[error("wrong kind of '{kind}' expected '{expected}' found: '{0}'")]
    WrongType {
        kind: &'static str,
        expected: &'static str,
        found: &'static str,
    },
}