Skip to main content

DeployAdapter

Trait DeployAdapter 

Source
pub trait DeployAdapter: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn deploy(&self, site_dir: &Path) -> Result<(), SsgError>;
}
Expand description

Trait implemented by per-target deploy adapters.

All current implementations are stubs (issue #527) — they log "deploy adapter for <name>: not yet implemented; see #527" and return Ok(()). The trait shape is the stable contract.

Required Methods§

Source

fn name(&self) -> &'static str

Short, human-readable name for logs (e.g. "netlify").

Source

fn deploy(&self, site_dir: &Path) -> Result<(), SsgError>

Performs the deploy. site_dir is the freshly built site root.

Stubs print a “not yet implemented” message and exit cleanly so users can wire CI now and pick up the actual upload behaviour in a follow-up patch.

§Errors

Returns SsgError if the deploy fails. Stubs never error; they always succeed after printing the placeholder message.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§