cartulary 0.3.0-alpha.1

The knowledge layer of your project — decisions, issues, docs, all in one place.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Port for routing site outputs through the domain rather than the
//! CLI helpers. `publish` is the unit of work — implementations
//! either land every entry of the bundle or leave the previous
//! output untouched. Adapters choose their own atomicity primitive
//! (filesystem staging + rename, S3 alias swap, transactional CMS).

use crate::domain::usecases::site::build::SiteBundle;

pub trait SiteWriter {
    /// Publish the bundle atomically. Either every page and asset
    /// lands at the target, or the previous output is preserved as-is
    /// and the call returns `Err`.
    fn publish(&self, bundle: SiteBundle) -> anyhow::Result<()>;
}