SemanticVersion

A three-component semantic version, compared numerically.

struct SemanticVersion

Initializers

init(_:_:_:)

init(_ major: Int, _ minor: Int, _ patch: Int)

Creates a version from components.

init(from:)

init(from decoder: Decoder) throws

init(string:)

init?(string: String)

Parses "X", "X.Y", or "X.Y.Z" with numeric components. Returns nil for anything else.

Properties

description

var description: String { get }

major

let major: Int

Major component.

minor

let minor: Int

Minor component.

patch

let patch: Int

Patch component.

Methods

encode(to:)

func encode(to encoder: Encoder) throws

Operators

<(_:_:)

static func < (lhs: SemanticVersion, rhs: SemanticVersion) -> Bool