Struct semver_rs::Options [−][src]
Expand description
Allows to configure the parsing of semver strings, same as the node-semver package. All options are false by default.
Example
let opts = Options::builder().loose(true).include_prerelease(true).build();
//or
let opts = Options { loose: true, include_prerelease: true };
Version::new("1.2.3").with_options(opts).parse()?;
Fields
loose: bool
Be more forgiving about not-quite-valid semver strings. Any resulting output will always be 100% strict compliant.
include_prerelease: bool
Set to suppress the default behavior of excluding prerelease tagged versions from ranges unless they are explicitly opted into.
Implementations
Returns a builder that allows building a Options instance.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Options
impl UnwindSafe for Options
Blanket Implementations
Mutably borrows from an owned value. Read more