pub fn from_manifest(version: &'a str, manifest: &'a VersionManifest) -> Option<Self> {
        // Split the version string
        let parts = Self::split_version_str(version, Some(&manifest));

        // Return nothing if the parts are none
        if parts.is_none() {
            return None;
        }

        // Create and return the object
        Some(Version {
            version: version,
            parts: parts.unwrap(),
            manifest: Some(&manifest),
        })
    }
/// Create a `Version` instance from a version string with the given `manifest`.
///
/// The version string should be passed to the `version` parameter.
///
/// # Examples
///
/// ```
/// use version_compare::{CompOp, Version, VersionManifest};
///
/// let manifest = VersionManifest::new();
/// let ver = Version::from_manifest("1.2.3", &manifest).unwrap();
///
/// assert_eq!(ver.compare(&Version::from("1.2.3").unwrap()), CompOp::Eq);
/// ```
Create a `Version` instance from a version string with the given `manifest`.
The version string should be passed to the `version` parameter.
Create a ` Version ` instance from a version string with the given ` manifest ` . The version string should be passed to the ` version ` parameter .
pub fn from_manifest(version: &'a str, manifest: &'a VersionManifest) -> Option<Self> {
        // Split the version string
        let parts = Self::split_version_str(version, Some(&manifest));
        // Return nothing if the parts are none
        if parts.is_none() {
            return None;
        }
        // Create and return the object
        Some(Version {
            version: version,
            parts: parts.unwrap(),
            manifest: Some(&manifest),
        })
    }
pub fn from_manifest ( version : & ' a str , manifest : & ' a VersionManifest ) -> Option < Self > { // Split the version string let parts = Self :: split_version_str ( version , Some ( & manifest ) ) ; // Return nothing if the parts are none if parts . is_none ( ) { return None ; } // Create and return the object Some ( Version { version : version , parts : parts . unwrap ( ) , manifest : Some ( & manifest ) , } ) }
Create a `Version` instance from a version string with the given `manifest`.
Create a ` Version ` instance from a version string with the given ` manifest ` .
version
&'a str
manifest
&'a VersionManifest
version
&'a str
manifest
&'a VersionManifest
examples
```
use version_compare::{CompOp, Version, VersionManifest}.

let manifest = VersionManifest::new();
let ver = Version::from_manifest("1.2.3", &manifest).unwrap().


` ` ` use version_compare :: { CompOp Version VersionManifest } . let manifest = VersionManifest :: new () ; let ver = Version :: from_manifest ( " 1 . 2 . 3 " &manifest ) . unwrap () .