#[non_exhaustive]pub struct DriverSpec {
pub format: Option<String>,
pub keys: Option<Vec<String>>,
pub read: Option<CommandField>,
pub write: Option<CommandField>,
pub after: Option<String>,
}Expand description
A version driver as declared, before it becomes a Driver. format and
keys edit the manifest in place. read and write run commands instead
and take precedence.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.format: Option<String>toml or json, edited at keys. gomod (the // vX.Y.Z comment on
a go.mod module line) and version (a file containing only the
version) take no keys.
keys: Option<Vec<String>>Key paths containing the version, tried in order.
read: Option<CommandField>Command that takes the manifest on stdin and prints the version.
write: Option<CommandField>Command that takes the manifest on stdin and prints it with the new version.
after: Option<String>Command run after the bumps, such as a lockfile refresh. Inferred from the tree for stock manifests when omitted.
Implementations§
Source§impl DriverSpec
impl DriverSpec
Sourcepub fn into_driver(self, name: &str) -> Result<Driver>
pub fn into_driver(self, name: &str) -> Result<Driver>
Build the Driver. name only labels the errors.
§Errors
Returns an error when a read and write pair has an empty mise task
name or an empty argv. Without that pair, it returns an error when
format is missing or not toml, json, gomod, or version, when
keys is missing or empty for toml or json, or when gomod or
version has keys.