pub struct FormatOptions {
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_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 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatOptions
impl Debug for FormatOptions
Source§impl Default for FormatOptions
impl Default for FormatOptions
Source§fn default() -> FormatOptions
fn default() -> FormatOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FormatOptions
impl RefUnwindSafe for FormatOptions
impl Send for FormatOptions
impl Sync for FormatOptions
impl Unpin for FormatOptions
impl UnsafeUnpin for FormatOptions
impl UnwindSafe for FormatOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more