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

        // 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: None,
        })
    }
/// Create a `Version` instance from a version string.
///
/// The version string should be passed to the `version` parameter.
///
/// # Examples
///
/// ```
/// use version_compare::{CompOp, Version};
///
/// let ver = Version::from("1.2.3").unwrap();
///
/// assert_eq!(ver.compare(&Version::from("1.2.3").unwrap()), CompOp::Eq);
/// ```
Create a `Version` instance from a version string.
The version string should be passed to the `version` parameter.
Create a ` Version ` instance from a version string . The version string should be passed to the ` version ` parameter .
pub fn from(version: &'a str) -> Option<Self> {
        // Split the version string
        let parts = Self::split_version_str(version, None);
        // 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: None,
        })
    }
pub fn from ( version : & ' a str ) -> Option < Self > { // Split the version string let parts = Self :: split_version_str ( version , None ) ; // 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 : None , } ) }
Create a `Version` instance from a version string.
Create a ` Version ` instance from a version string .
version
&'a str
version
&'a str
examples
```
use version_compare::{CompOp, Version}.




` ` ` use version_compare :: { CompOp Version } .