pub struct FormatOptions {
pub include_op: bool,
pub include_minor: bool,
pub include_scope: bool,
pub include_patch: bool,
pub include_prerelease: bool,
pub include_build: bool,
pub pad_major: Option<u8>,
pub pad_minor: Option<u8>,
pub pad_patch: Option<u8>,
pub separator: char,
}Expand description
Options for formatting a version into a string.
Fields§
§include_op: boolWhether to include the comparison operator, and wildcard placeholders, for requirements.
include_minor: boolWhether to include the minor version.
include_scope: boolWhether to include the scope.
include_patch: boolWhether to include the patch version.
include_prerelease: boolWhether to include the pre-release information.
include_build: boolWhether to include the build metadata.
pad_major: Option<u8>Whether to pad the major version with leading zeros, and if so, how many digits to pad to.
pad_minor: Option<u8>Whether to pad the minor version with leading zeros, and if so, how many digits to pad to.
pad_patch: Option<u8>Whether to pad the patch version with leading zeros, and if so, how many digits to pad to.
separator: charThe separator character to use between version components.
Implementations§
Source§impl FormatOptions
impl FormatOptions
Sourcepub fn new(kind: VersionKind) -> FormatOptions
pub fn new(kind: VersionKind) -> FormatOptions
Create a new FormatOptions instance with the specified version kind.
Sourcepub fn calendar() -> FormatOptions
pub fn calendar() -> FormatOptions
Returns a new FormatOptions instance with default settings for calendar versioning.
Sourcepub fn semantic() -> FormatOptions
pub fn semantic() -> FormatOptions
Returns a new FormatOptions instance with default settings for semantic versioning.
Trait Implementations§
Source§impl Clone for FormatOptions
impl Clone for FormatOptions
Source§fn clone(&self) -> FormatOptions
fn clone(&self) -> FormatOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more