Enum pact_models::PactSpecification
source · #[repr(C)]pub enum PactSpecification {
Unknown = 0,
V1 = 1,
V1_1 = 2,
V2 = 3,
V3 = 4,
V4 = 5,
}
Expand description
Enum defining the pact specification versions supported by the library
Variants§
Unknown = 0
Unknown or unsupported specification version
V1 = 1
First version of the pact specification (https://github.com/pact-foundation/pact-specification/tree/version-1
)
V1_1 = 2
Second version of the pact specification (https://github.com/pact-foundation/pact-specification/tree/version-1.1
)
V2 = 3
Version two of the pact specification (https://github.com/pact-foundation/pact-specification/tree/version-2
)
V3 = 4
Version three of the pact specification (https://github.com/pact-foundation/pact-specification/tree/version-3
)
V4 = 5
Version four of the pact specification (https://github.com/pact-foundation/pact-specification/tree/version-4
)
Implementations§
source§impl PactSpecification
impl PactSpecification
sourcepub fn version_str(&self) -> String
pub fn version_str(&self) -> String
Returns the semantic version string of the specification version.
sourcepub fn parse_version<S: Into<String>>(input: S) -> Result<PactSpecification>
pub fn parse_version<S: Into<String>>(input: S) -> Result<PactSpecification>
Parse a version string into a PactSpecification
Trait Implementations§
source§impl Clone for PactSpecification
impl Clone for PactSpecification
source§fn clone(&self) -> PactSpecification
fn clone(&self) -> PactSpecification
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PactSpecification
impl Debug for PactSpecification
source§impl Default for PactSpecification
impl Default for PactSpecification
source§impl<'de> Deserialize<'de> for PactSpecification
impl<'de> Deserialize<'de> for PactSpecification
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for PactSpecification
impl Display for PactSpecification
source§impl From<&String> for PactSpecification
impl From<&String> for PactSpecification
source§impl From<&str> for PactSpecification
impl From<&str> for PactSpecification
source§impl From<String> for PactSpecification
impl From<String> for PactSpecification
source§impl PartialEq for PactSpecification
impl PartialEq for PactSpecification
source§fn eq(&self, other: &PactSpecification) -> bool
fn eq(&self, other: &PactSpecification) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PactSpecification
impl PartialOrd for PactSpecification
source§fn partial_cmp(&self, other: &PactSpecification) -> Option<Ordering>
fn partial_cmp(&self, other: &PactSpecification) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more