pub trait DriverAdapter {
// Required methods
fn driver(&self) -> &'static str;
fn read_version(&self, root: &Utf8Path) -> Result<Version, RkError>;
fn write_version(
&self,
root: &Utf8Path,
version: Version,
) -> Result<Vec<Utf8PathBuf>, RkError>;
fn build(
&self,
root: &Utf8Path,
epoch: &str,
) -> Result<Vec<Utf8PathBuf>, RkError>;
// Provided method
fn tag_of(&self, version: Version) -> String { ... }
}Expand description
What the engine asks of a driver: its version, read and written through the native tool, the tag a version takes, and its build.
The registry upload stays in CI, where the publishing identity is the job, so the trait has no publish method.
Required Methods§
Sourcefn read_version(&self, root: &Utf8Path) -> Result<Version, RkError>
fn read_version(&self, root: &Utf8Path) -> Result<Version, RkError>
The version the target carries now.
§Errors
A refusal where the version cannot be read or is not one release-kit releases.
Sourcefn write_version(
&self,
root: &Utf8Path,
version: Version,
) -> Result<Vec<Utf8PathBuf>, RkError>
fn write_version( &self, root: &Utf8Path, version: Version, ) -> Result<Vec<Utf8PathBuf>, RkError>
Write version and return every file the write changed, relative
to root.
§Errors
The native tool’s failure.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".