Expand description
Reusable high-level APIs for BoxFerry conversions.
This facade exposes the same neutral model and conversion engine used by the boxferry
command-line application. Compose, Podman, and Quadlet adapters are available through additive
features. Every conversion uses the importer → neutral model → exporter pipeline.
Planning does not execute generated commands or mutate a runtime. Podman acquisition requires an explicit caller-supplied read-only transport, and Podman output is a reviewable deployment plan and command script.
§Example
use boxferry::{
Application, Identifier, InMemoryAdapter, LossPolicy, PlatformVersion, TargetProfile,
convert,
};
let application = Application::new(Identifier::new("example")?);
let adapter = InMemoryAdapter::exact("target document".to_owned());
let target = TargetProfile::new("podman", PlatformVersion::new(5, 4, 0), None)?;
let result = convert(
&adapter,
&application,
&adapter,
&target,
LossPolicy::ExactOnly,
)?;
assert_eq!(result.output().map(String::as_str), Some("target document"));Re-exports§
pub use boxferry_compose as compose;pub use boxferry_engine as engine;pub use boxferry_model as model;pub use boxferry_podman as podman;pub use boxferry_quadlet as quadlet;
Modules§
- report
- Versioned, presentation-independent conversion reports. Versioned, privacy-safe conversion reports.
Structs§
- Annotation
- One protected annotation with independently sourced name and value.
- Application
- One ordered multi-service application graph.
- Artifact
Dependency - One explicit, directed image-artifact dependency.
- Build
Context - One named additional context in a structured source build declaration.
- Build
Setting Values - One typed collection belonging to one explicitly present image-artifact key.
- Compose
Exporter - Loss-aware exporter for deterministic, parse-back-validated Compose YAML.
- Compose
Importer - Maps an explicitly processed Compose source into
BoxFerry’s neutral model. - Compose
Source - A merged Compose project and the caller-owned context needed to import it safely.
- Config
- One application-level configuration declaration.
- Conversion
Outcome - One subject-level conversion decision.
- Conversion
Plan - Validated target candidate, decisions, and structured diagnostics.
- Conversion
Result - Policy-authorized conversion output and its complete report.
- Diagnostic
- Structured conversion diagnostic.
- Diagnostic
Code - Stable machine-readable diagnostic identifier.
- Diagnostic
Field - Named structured context attached to a diagnostic.
- Diagnostic
Rule - Immutable metadata shared by human, JSON, and support-bundle presentation.
- Environment
File - One ordered environment-file declaration.
- Environment
Variable - One ordered service environment entry.
- Exposed
Port - A container port exposed for inter-service use without publishing it to a host.
- Healthcheck
- Format-independent service health-check intent with field-level provenance.
- Healthcheck
Duration - Raw-preserving duration shared by container health-check implementations.
- Healthcheck
Retries - Raw-preserving non-negative health-check retry count.
- Host
Address - One raw-preserving address or runtime token used by a service host mapping.
- Host
Mapping - One ordered service hostname-to-address mapping.
- Identifier
- Opaque, non-empty application or resource identifier.
- Image
Acquisition - An image-acquisition resource.
- Image
Artifact Assignment - One source-preserving assignment used by image artifact settings.
- Image
Build - An image-build resource with independently retained source declaration and artifact settings.
- Image
Reference - A preserved image reference with optional tag and digest components.
- Import
Result - Recoverable result of importing a native source model.
- InMemory
Adapter - Deterministic adapter for public API tests and embedding examples.
- Kernel
Parameter - One raw-preserving kernel-parameter assignment.
- Logging
- Provider-specific logging intent.
- Logging
Option - One provider-specific logging option with independently sourced name and value.
- Metadata
Label - One portable metadata label attached to an application resource.
- Mount
- One service storage attachment.
- Native
Finding - A native parser, model, runtime, or platform finding retained at an adapter boundary.
- Native
Finding Label - One value-free source location attached to a native-format finding.
- Network
- One application-level network declaration.
- Network
Attachment - One service attachment to an application network.
- Network
Driver Option - One driver-specific network option with independently sourced key and value.
- Network
Ipam Config - One explicitly associated IPAM configuration row.
- Parse
Platform Version Error - Error returned when a platform version is not exactly
major.minor.patch. - Platform
Version - Numeric target implementation version.
- Podman
Exporter - Loss-aware Podman exporter producing only review artifacts.
- Podman
Importer - PodmanLens-to-neutral-model semantic importer.
- Podman
Output - Serialized
PodmanLensdeployment artifact and runnable shell rendering. - Podman
Promotion Policy - Explicit authorization for promoting effective runtime observations into desired intent.
- Podman
Source - One explicit Podman import source after caller-owned acquisition and discovery.
- Port
- One container port and its optional single-host publication.
- Protected
String - Plain or sensitive text with redacting debug output.
- Provenance
- Location from which a neutral-model value was derived.
- Quadlet
Document Input - One caller-supplied Quadlet unit file held entirely in memory.
- Quadlet
Exporter - Native target adapter for validated Podman Quadlet output.
- Quadlet
File - One generated Quadlet file whose contents passed
QuadletLensparse-back validation. - Quadlet
Importer - Maps an explicitly parsed Quadlet document set into
BoxFerry’s neutral model. - Quadlet
Output - Deterministically ordered generated files and their validated dependency graph.
- Quadlet
Parse Diagnostic - One recoverable
QuadletLensdiagnostic retained without source contents. - Quadlet
Parse Diagnostic Label - One labelled byte range on a
QuadletParseDiagnostic. - Quadlet
Parse Error - Quadlet parse failure with recoverable diagnostics retained.
- Quadlet
Parse Failure - A non-recoverable failure that prevented a parse result.
- Quadlet
Parse Result - Successful native parse with every recoverable diagnostic retained.
- Quadlet
Source - A named Quadlet document set and caller-owned source identities.
- Resolved
Podman Target - A
BoxFerrytarget resolved to one exact reviewed Podman engine and API pair. - Resource
Grant - One ordered service grant of a configuration or secret resource.
- Resource
Limit - One raw-preserving resource-limit declaration.
- Retained
Native Evidence - One provenance-bearing native evidence event.
- Secret
- One application-level secret declaration.
- Service
- One application service with ordered attachments and source provenance.
- Service
Dependency - One ordered dependency edge from a service to another application service.
- Service
Group - One structural group of application services.
- Service
Group Runtime - Native runtime settings owned by one
ServiceGroup. - Source
Build Secret - A source build-secret declaration whose options remain distinct from target build-secret text.
- Source
Id - Caller-selected identity for one imported source.
- Source
Span - Half-open byte range in one imported source.
- Sourced
- A value and every source location that contributed to it.
- Stop
Timeout - Raw-preserving stop grace duration.
- Target
Profile - Caller-selected target implementation and supported compatibility range.
- Version
Range - Inclusive minimum and optional maximum target versions.
- Volume
- One application-level volume declaration.
Enums§
- Artifact
Dependency Node - A format-neutral node used by explicit image-artifact dependency validation.
- Build
Attestation - A source build attestation value.
- Build
Source Declaration - One source declaration for an image build.
- Build
Syntax - The generic syntax family that supplied a build declaration or per-key value collection.
- Command
- How a service command overrides the image command.
- Compose
Finding Stage - Compose processing layer that emitted a retained native finding.
- Compose
Runtime - Exact backend runtime used by the selected Compose provider.
- Config
Material - Material source for an application-managed configuration resource.
- Conversion
Error - Failure before a policy-authorized conversion result can be created.
- Conversion
Kind - Fidelity of one source-to-target decision.
- Device
- A service device declaration with its authored syntax retained.
- Diagnostic
Value - Plain or sensitive diagnostic field value.
- Entrypoint
- How a service overrides the image entrypoint.
- Environment
File Format - Explicit parsing mode requested for an environment file.
- Environment
File Syntax - Authored syntax family retained for an environment-file declaration.
- Environment
Value - Source of an environment variable’s value.
- Group
Exit Policy - Pod exit behavior retained without assigning lifecycle semantics to group membership.
- Healthcheck
Command - How a container runtime executes one service health check.
- Host
Address Kind - Conservative kind of one service host-mapping address.
- Image
Acquisition Setting - One image-acquisition setting.
- Image
Build Setting - One image-build setting.
- Loss
Policy - Caller-selected authorization for non-exact candidate output.
- Model
Error - Error raised when constructing an invalid neutral model value.
- Mount
Source - Storage backing attached to a service.
- Native
Finding Label Kind - Producer-neutral role of one source location attached to a native finding.
- Podman
Target Error - Failure to resolve a
BoxFerrytarget to reviewed Podman rendering evidence. - Protocol
- Transport protocol attached to a published port.
- Provenance
Kind - How a neutral-model value entered a conversion plan.
- Pull
Policy - Source-independent image pull intent.
- Quadlet
Exporter Error - Failure while creating a Quadlet exporter.
- Quadlet
Grouping Policy - Caller-selected relationship between source services and generated Quadlet units.
- Quadlet
Parse Diagnostic Origin - Origin of one native diagnostic retained by
QuadletSource::parse. - Quadlet
Parse Diagnostic Severity - Severity of one native diagnostic retained by
QuadletSource::parse. - Quadlet
Parse Failure Stage - Stage that produced a non-recoverable parse failure.
- Reload
Action - One mutually exclusive reload action.
- Resource
Grant Syntax - Authored syntax family retained for a config or secret grant.
- Resource
Ownership - Who owns a named application resource lifecycle.
- Restart
Policy - Container-level automatic restart intent.
- Retained
Native Evidence Event - One authored opaque native occurrence retained in source order.
- Retained
Native Evidence Subject - Resource-qualified opaque source fact retained for explanation, never execution.
- RuleId
- Stable identifier for one
BoxFerrydiagnostic rule. - Secret
Material - Material source for an application-managed secret resource.
- Security
Option - One format-independent service security option.
- Selinux
Relabel SELinuxlabel sharing requested for a bind mount.- Service
Dependency Condition - Readiness state a service dependency must reach before its dependent starts.
- Severity
- Diagnostic severity independent from presentation and process exit codes.
- Source
Build Setting - One field from a structured source build declaration.
- Startup
Notification - Startup notification behavior requested for one service.
- Volume
Image Source - The explicit source of an image-backed volume.
Constants§
- COMPOSE_
SPECIFICATION_ PROFILE_ REVISION - Internal revision used with
COMPOSE_SPECIFICATION_TARGET. - COMPOSE_
SPECIFICATION_ TARGET - Provider-neutral target for the rolling Compose Specification.
- DOCKER_
COMPOSE_ TARGET - Target implementation name for Docker Compose output.
- PODMAN_
COMPOSE_ TARGET - Target implementation name for the independent
containers/podman-composeprovider. - PODMAN_
TARGET - Target implementation name accepted by the Podman exporter.
- RULES
- Complete, code-sorted catalogue for this
BoxFerrybuild.
Traits§
- Export
Adapter - Plans one neutral application for a native target model.
- Import
Adapter - Maps one native source model into the format-independent application model.
Functions§
- acquire_
podman_ source - Acquires and discovers one explicit read-only Podman source.
- convert
- Runs the same explicit import-plan-authorize path used by the
BoxFerryCLI. - convert_
imported - Continues conversion from one completed native-to-neutral import.
- find_
rule - Finds a rule by exact code or human-readable name.
- resolve_
podman_ target - Selects the newest exact reviewed Podman version in the requested inclusive range.
- reviewed_
podman_ versions - Returns exact Podman engine versions backed by
PodmanLensrendering evidence.