Skip to main content

Crate proto_core

Crate proto_core 

Source

Re-exports§

pub use version_spec;
pub use warpgate;

Modules§

cfg
checksum
flow
layout
registry
reporter
utils

Structs§

DataLocator
An inline data locator.
EnvFile
FileLocator
A file system locator.
FormatOptions
Options for formatting a version into a string.
GitHubLocator
A GitHub release locator.
Id
A compact string identifier for use within records, key lookups, and more. Supports unicode alphanumeric characters, forward slash /, period ., underscore _, and dash -. A leading @ is supported to support npm package names.
IdError
ID errors.
LockRecord
PartialProtoBackendConfig
PartialProtoBuildConfig
PartialProtoConfig
PartialProtoOfflineConfig
PartialProtoPluginsConfig
PartialProtoSettingsConfig
PartialProtoShellConfig
PartialProtoToolConfig
ProtoBackendConfig
ProtoBuildConfig
ProtoConfig
ProtoConfigEnvOptions
ProtoConfigFile
ProtoDirEntry
ProtoEnvironment
ProtoFileManager
ProtoLock
ProtoOfflineConfig
ProtoPluginsConfig
ProtoSettingsConfig
ProtoShellConfig
ProtoToolConfig
Range
A version range composed of clauses, in which any clause may match, for example ^1 || 2.3.4 - 3.0.0 || >=4, <5.
RegistryConfig
Configures an individual plugin registry.
RegistryLocator
An OCI registry locator.
Requirement
A version requirement composed of a comparison operator and a full or partial version to match against. Build metadata is accepted when parsing, but is otherwise ignored.
SyntaxParser
Tool
ToolContext
ToolManifest
ToolManifestVersion
ToolSpec
UrlLocator
A HTTPS URL locator.
Version
A version in either calendar or semantic format, with support for scopes, pre-releases, and build metadata.
VersionResolver

Enums§

BuiltinPlugins
Clause
A single clause within a version range.
ConfigMode
DetectStrategy
EnvVar
Op
The comparison operator of a requirement.
PartialBuiltinPlugins
PartialEnvVar
PinLocation
PluginLocator
Strategies and protocols for locating plugins.
PluginType
ProtoConfigError
ProtoEnvError
ProtoLoaderError
ProtoToolError
Rule
SpecError
UnresolvedVersionSpec
Represents an unresolved version or alias that must be resolved to a fully-qualified version.
VersionKind
The kind of version, either calendar or semantic.
VersionSpec
Represents a resolved version or alias.

Constants§

ENV_FILE_KEY
MANIFEST_NAME
PROTO_CONFIG_NAME
PROTO_LOCK_NAME
PROTO_PLUGIN_KEY
SCHEMA_PLUGIN_KEY

Statics§

ENV_VAR
ENV_VAR_SUB

Traits§

FormatsVersion
Trait for formatting a version into a string with custom options.
MatchesRequirement
Trait for matching a requirement against the implementing type.
MatchesVersion
Trait for matching a version against the implementing type.

Functions§

fast_list_clone
Cloning an entire list, like Vec, is very costly as it clones the entire structure. This helper allows you to clone just the values, which is much faster if you don’t need the list features.
fast_map_clone
Cloning an entire map, like IndexMap, is very costly as it clones the entire structure. This helper allows you to clone just the keys and values, which is much faster if you don’t need the map features.
find_debug_locator_with_fallback
get_builtin_registry
get_proto_version
inject_proto_manifest_config
is_archive_file
is_cache_enabled
is_calver_like
Returns true if the provided value looks like a calendar version string, instead of a semantic version string. This is used to determine which parser to use.
is_offline
is_semver_like
Returns true if the provided value looks like a semver version string, instead of a calendar version string. This is used to determine which parser to use.
load_schema_config
load_schema_plugin_with_proto
load_tool
load_tool_from_locator
locate_plugin
match_highest_version
now
read_json_file_with_lock
resolve_version
write_json_file_atomic
Serialize and write JSON to the provided path by writing to a temporary file in the same directory, then atomically renaming it over the destination. Unlike a truncate-then-write, another process can never observe an empty or partially written file, even if this process is killed mid-write. https://github.com/moonrepo/proto/issues/1057
write_json_file_with_lock

Type Aliases§

ParseError
ToolMetadata