//! Job + Processor: the user-facing types every backend agrees on.
use async_trait;
use Container;
use Serialize;
use DeserializeOwned;
/// JSON-round-trippable + Clone (retry keeps a copy) + cross-task safe.
///
/// The marker is intentionally minimal — backends communicate jobs as JSON on
/// the wire (the open contract), so every `Job` is `Serialize +
/// DeserializeOwned`. Backends that prefer a binary codec internally still
/// negotiate this JSON shape at the macro/inventory boundary.
/// A returned `Err` marks the job failed; the backend retries up to the
/// `#[process(retries = N)]` budget.
/// Queue analog of `#[injectable]`'s `from_container`, expressed as a trait so
/// a backend can build any processor generically from the container.