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 moresource§impl Serialize for PactSpecification
impl Serialize for PactSpecification
impl Copy for PactSpecification
impl StructuralPartialEq for PactSpecification
Auto Trait Implementations§
impl Freeze for PactSpecification
impl RefUnwindSafe for PactSpecification
impl Send for PactSpecification
impl Sync for PactSpecification
impl Unpin for PactSpecification
impl UnwindSafe for PactSpecification
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more