Crate proto_pdk_api

source ·

Macros§

  • Construct an ad-hoc error from a string or existing non-anyhow error value.
  • Wrap an enum with common derives and serde required attributes.
  • Wrap a struct with common derives and serde required attributes.

Structs§

Enums§

Functions§

  • Cleans a version requirement string by removing * version parts, and correcting AND operators.
  • Cleans a potential version string by removing a leading v or V.
  • Get a regex pattern that matches calendar versions (calver). For example: 2024-02-26, 2024-12, 2024-01-alpha, etc.
  • Get a regex pattern that matches semantic versions (semver). For example: 1.2.3, 6.5.4, 7.8.9-alpha, etc.
  • Returns true if the provided value is an alias. An alias is a word that maps to version, for example, “latest” -> “1.2.3”.
  • Returns true if the provided value is a calendar version string.
  • Returns true if the provided value is a semantic version string.
  • Parse the provided string and determine the output format. Since an unresolved version can be many things, such as an alias, version requirement, semver, or calver, we need to parse this manually to determine the correct output.
  • Parse the provided string as a list of version requirements, as separated by ||. Each requirement will be parsed individually with parse.

Type Aliases§

  • Represents any result (using anyhow).