Skip to main content

Crate moon_pdk_api

Crate moon_pdk_api 

Source

Macros§

anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
api_enum
Wrap an enum with common derives and serde required attributes.
api_struct
Wrap a struct with common derives and serde required attributes.
api_unit_enum
Wrap a unit-only enum with common derives and serde required attributes.
config_struct
Apply default attributes for configuration based structs. Will assume that all keys are in camel case.
json_config
shared_config
toml_config

Structs§

DataLocator
An inline data locator.
DefineDockerMetadataInput
Input passed to the define_docker_metadata function.
DefineDockerMetadataOutput
Output returned from the define_docker_metadata function.
DefineExtensionConfigOutput
Output returned from the define_extension_config function.
DefineRequirementsInput
Input passed to the define_requirements function.
DefineRequirementsOutput
Output returned from the define_requirements function.
DefineToolchainConfigOutput
Output returned from the define_toolchain_config function.
DetectVersionInput
Input passed to the detect_version_files function.
DetectVersionOutput
Output returned by the detect_version_files function.
DownloadPrebuiltInput
Input passed to the download_prebuilt function.
DownloadPrebuiltOutput
Output returned by the download_prebuilt function.
EmptyInput
Represents an empty input.
ExecCommand
A command to be executed on the host machine, with optional caching and retrying.
ExecCommandInput
Input passed to the exec_command host function.
ExecCommandOutput
Output returned from the exec_command host function.
ExecuteExtensionInput
Input passed to the execute_extension function.
ExtendCommandInput
Input passed to the extend_command function.
ExtendCommandOutput
Output returned from the extend_command and extend_task_command functions.
ExtendProjectGraphInput
Input passed to the extend_project_graph function.
ExtendProjectGraphOutput
Output returned from the extend_project_graph function.
ExtendProjectOutput
Output utilized within the extend_project_graph function.
ExtendTaskCommandInput
Input passed to the extend_task_command function.
ExtendTaskScriptInput
Input passed to the extend_task_script function.
ExtendTaskScriptOutput
Output returned from the extend_task_script function.
FileLocator
A file system locator.
GetVcsImpactsInput
Input passed to get_vcs_impacts after initialization.
GetVcsImpactsOutput
Output returned by get_vcs_impacts.
GitHubLocator
A GitHub release locator.
HashTaskContentsInput
Input passed to the hash_task_contents function.
HashTaskContentsOutput
Output returned from the hash_task_contents function.
HostEnvironment
Information about the host environment (the current runtime).
HostLogInput
Input passed to the host_log host function.
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.
InitializePluginInput
Input passed to the initialize functions.
InitializePluginOutput
Output returned from the initialize functions.
InitializeVcsInput
Input passed to initialize_vcs exactly once per plugin instance.
InstallDependenciesInput
Input passed to the install_dependencies function. Requires locate_dependencies_root.
InstallDependenciesOutput
Output returned from the install_dependencies function.
LoadVersionsInput
Input passed to the load_versions function.
LoadVersionsOutput
Output returned by the load_versions function.
LocateDependenciesRootInput
Input passed to the locate_dependencies_root function.
LocateDependenciesRootOutput
Output returned from the locate_dependencies_root function.
LocateExecutablesInput
Input passed to the locate_executables function.
LocateExecutablesOutput
Output returned by the locate_executables function.
LockDependency
Represents a dependency definition in a lockfile.
ManifestDependencyConfig
Represents a dependency in a manifest file.
MoonContext
Information about the current moon workspace.
NativeInstallInput
Input passed to the native_install function.
NativeInstallOutput
Output returned by the native_install function.
NativeUninstallInput
Input passed to the native_uninstall function.
NativeUninstallOutput
Output returned by the native_uninstall function.
Operation
An operation can be used to track timings, statuses, and results for business logic that was performed within an action (a plugin function).
ParseLockInput
Input passed to the parse_lock function.
ParseLockOutput
Output returned from the parse_lock function.
ParseManifestInput
Input passed to the parse_manifest function.
ParseManifestOutput
Output returned from the parse_manifest function.
ParseVersionFileInput
Input passed to the parse_version_file function.
ParseVersionFileOutput
Output returned by the parse_version_file function.
PathParseError
Error type for path parsing failures.
ProjectDependency
A project-to-project relationship.
ProjectFragment
Fragment of a project including important fields.
PruneDockerInput
Input passed to the prune_docker function. Requires locate_dependencies_root.
PruneDockerOutput
Output returned from the prune_docker function.
Range
A version range composed of clauses, in which any clause may match, for example ^1 || 2.3.4 - 3.0.0 || >=4, <5.
RealPath
Represents a real absolute path on the host system.
RegisterExtensionInput
Input passed to the register_extension function.
RegisterExtensionOutput
Output returned from the register_extension function.
RegisterToolInput
Input passed to the register_tool function.
RegisterToolOutput
Output returned by the register_tool function.
RegisterToolchainInput
Input passed to the register_toolchain function.
RegisterToolchainOutput
Output returned from the register_toolchain function.
RegisterVcsInput
Input passed to register_vcs before any other provider operation.
RegisterVcsOutput
Provider metadata returned by register_vcs.
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.
ResolveVersionInput
Input passed to the resolve_version function.
ResolveVersionOutput
Output returned by the resolve_version function.
ScaffoldDockerInput
Input passed to the scaffold_docker function.
ScaffoldDockerOutput
Output returned from the scaffold_docker function.
SendRequestInput
Input passed to the send_request host function.
SendRequestOutput
Output returned from the send_request host function.
SettingCondition
Represents a condition against another setting.
SettingPrompt
Represents a prompt (question) for a configuration setting.
SetupEnvironmentInput
Input passed to the setup_environment function.
SetupEnvironmentOutput
Output returned from the setup_environment function.
SetupToolchainInput
Input passed to the setup_toolchain function.
SetupToolchainOutput
Output returned from the setup_toolchain function.
SetupVcsHookEnvironmentInput
Input passed to setup_vcs_hook_environment after initialization.
SetupVcsHookEnvironmentOutput
Hook execution environment returned by setup_vcs_hook_environment.
SyncOutput
Output returned from the sync_workspace and sync_project functions.
SyncProjectInput
Input passed to the sync_project function.
SyncWorkspaceInput
Input passed to the sync_workspace function.
TaskFragment
Fragment of a task including important fields.
TeardownToolchainInput
Input passed to the teardown_toolchain function.
TeardownVcsHookEnvironmentInput
Input passed to teardown_vcs_hook_environment after initialization.
TeardownVcsHookEnvironmentOutput
Output returned by teardown_vcs_hook_environment.
TestEnvironment
Information about the current testing environment.
UnpackArchiveInput
Input passed to the unpack_archive function.
UrlLocator
A HTTPS URL locator.
VcsChangeMask
VcsInitialization
Provider metadata and exact states pinned by initialize_vcs.
VcsRoots
Repository roots fixed by initialize_vcs.
VcsState
An exact provider state resolved during initialization.
Version
A version in either calendar or semantic format, with support for scopes, pre-releases, and build metadata.
VirtualPath
Represents a virtual absolute path on the guest system.

Enums§

CacheInput
Types of inputs that can be cached.
CacheStrategy
Types of caching strategies.
ConditionType
A type of condition to evaluate against a setting value.
Extend
Type of extend/merge strategy.
HostArch
Architecture of the system environment.
HostLibc
Libc being used in the system environment.
HostLogTarget
Target where host logs should be written to.
HostOS
Operating system of the current environment.
InitializeVcsOutput
Applicability and initialized state returned by initialize_vcs.
ManifestDependency
Represents a dependency definition in a manifest file.
OperationStatus
The status of a performed operation.
PluginLocator
Strategies and protocols for locating plugins.
PluginLocatorError
Errors during plugin locator parsing.
PromptType
The type of prompt to render to receive an answer.
ScaffoldDockerPhase
The different scaffolding phases.
SpecError
UnresolvedVersionSpec
Represents an unresolved version or alias that must be resolved to a fully-qualified version.
VcsHistoryCompleteness
Availability of repository history at initialization.
VcsImpactCompleteness
Safety guarantee attached to an impact result.
VcsImpactIntent
moon-level reason for requesting impacted files.
VersionSpec
Represents a resolved version or alias.

Constants§

VCS_PLUGIN_PROTOCOL_VERSION
Exact wire-protocol generation supported by this host or provider.

Statics§

ID_CLEAN_PATTERN
Pattern that removes unsupported characters from an identifier.
ID_PATTERN
Pattern that all identifiers are matched against. Supports unicode alphanumeric characters, forward slash /, period ., underscore _, and dash -. A leading @ is supported to support npm package names.

Traits§

MatchesVersion
Trait for matching a version against the implementing type.

Functions§

convert_to_real_native_path
Convert the provided virtual guest path to a real host path, returning a PathBuf instead of a RealPath. If the guest path does not match any of the provided virtual paths, it will return the original path.
convert_to_real_path
Convert the provided virtual guest path to a real host path. If the guest path does not match any of the provided virtual paths, it will return None.
convert_to_virtual_path
Convert the provided real host path to a virtual guest path. If the host path does not match any of the provided virtual paths, it will return None.
sort_paths_list
Sort paths from longest to shortest host path, so that prefix replacing is deterministic and accurate.

Type Aliases§

AnyResult
Represents any result (using anyhow).
ConfigSchema
ExtendTaskCommandOutput
InitializeExtensionInput
InitializeExtensionOutput
InitializeToolchainInput
InitializeToolchainOutput