Trait Builder

Source
pub trait Builder<'a, R> {
    type Error;
    type Publisher: Publish<R>;

    // Required method
    fn build(
        self,
    ) -> Result<(HashMap<AtomTag, PathBuf>, Self::Publisher), Self::Error>;
}
Expand description

A Builder produces a Publish implementation, which has no other constructor. This is critical to ensure that vital invariants necessary for maintaining a clean and consistent state in the Ekala store are verified before publishing can occur.

Required Associated Types§

Source

type Error

The error type returned by the Builder::build method.

Source

type Publisher: Publish<R>

The Publish implementation to construct.

Required Methods§

Source

fn build( self, ) -> Result<(HashMap<AtomTag, PathBuf>, Self::Publisher), Self::Error>

Collect all the Atoms in the worktree into a set.

This function must be called before Publish::publish to ensure that there are no duplicates, as this is the only way to construct an implementation.

Implementors§