shepherd-rs 0.1.0

Shepherd is a resilient, non-blocking orchestrator that persistently transforms and delivers data—built for remote, compute-heavy workloads.
Documentation
use crate::transform::request::TransformRequest;

pub trait TransformAttempt: Eq + Send + Sync
where
    <Self as TransformAttempt>::TransformRequest: TransformRequest + Send,
    <Self as TransformAttempt>::AttemptInput: Send,
    <Self as TransformAttempt>::AttemptOutput: Send, {
    /// The base `TransformRequest` type that this `TransformAttempt` attempts
    /// to resolve
    type TransformRequest;

    type AttemptCallContext: Send;

    type AttemptReturnContext: Send;

    type AttemptIdentifier: Send;

    type AttemptError: Send;

    type AttemptInput = (
        Self::AttemptIdentifier,
        <Self::TransformRequest as TransformRequest>::Input,
        Self::AttemptCallContext,
    );
    type AttemptOutput = (
        Self::AttemptIdentifier,
        <Self::TransformRequest as TransformRequest>::Output,
        Self::AttemptReturnContext,
    );
}

pub enum TransformAttemptStatus {
    /// The transformation attempt is pending.
    Pending,

    /// The transformation attempt is in progress.
    DTUAssigned,

    /// The transformation attempt has been completed successfully.
    Resolved,

    /// The transformation attempt has failed.
    Failed(String), // Contains an error message
}