pub trait Init<R, O, T: Send> {
type Error;
// Required methods
fn sync(&self, transport: Option<&mut T>) -> Result<O, Self::Error>;
fn ekala_init(&self, transport: Option<&mut T>) -> Result<(), Self::Error>;
fn ekala_root(&self, transport: Option<&mut T>) -> Result<R, Self::Error>;
}
Expand description
A trait representing the methods required to initialize an Ekala store.
Required Associated Types§
Required Methods§
Sourcefn sync(&self, transport: Option<&mut T>) -> Result<O, Self::Error>
fn sync(&self, transport: Option<&mut T>) -> Result<O, Self::Error>
Sync with the Ekala store, for implementations that require it.
Implementations on Foreign Types§
Source§impl<'repo> Init<Root, Ref, Box<dyn Transport + Send>> for Remote<'repo>
impl<'repo> Init<Root, Ref, Box<dyn Transport + Send>> for Remote<'repo>
Source§fn ekala_root(
&self,
transport: Option<&mut Box<dyn Transport + Send>>,
) -> Result<Root, Self::Error>
fn ekala_root( &self, transport: Option<&mut Box<dyn Transport + Send>>, ) -> Result<Root, Self::Error>
Determines if this remote is a valid Ekala store by pulling HEAD and the root tag, ensuring the latter is actually the root of HEAD, returning the root.
Source§fn sync(
&self,
transport: Option<&mut Box<dyn Transport + Send>>,
) -> Result<Ref, Error>
fn sync( &self, transport: Option<&mut Box<dyn Transport + Send>>, ) -> Result<Ref, Error>
Sync with the given remote and get the most up to date HEAD according to it.
Source§fn ekala_init(
&self,
transport: Option<&mut Box<dyn Transport + Send>>,
) -> Result<(), Error>
fn ekala_init( &self, transport: Option<&mut Box<dyn Transport + Send>>, ) -> Result<(), Error>
Initialize the repository by calculating the root, according to the latest HEAD.