Skip to main content

Crate imagegen_bridge_core

Crate imagegen_bridge_core 

Source
Expand description

Provider-neutral domain contract for Imagegen Bridge.

Structs§

AspectRatio
Aspect ratio represented as WIDTH:HEIGHT with non-zero integer terms.
BatchCapabilities
Effective and native multi-output behavior for a provider/model pair.
BridgeError
Public, redaction-safe error returned by the bridge.
GeneratedImage
Metadata and payload for one generated image.
GenerationParameters
Image-generation parameters shared across providers.
ImageFailure
Failure for one output in a best-effort multi-image request.
ImageInput
One image input plus optional metadata.
ImageJob
Complete durable job record returned by detail lookup.
ImageJobPage
Cursor-paginated job/history result.
ImageJobProgress
Bounded latest progress snapshot for a durable job.
ImageJobSummary
List-safe durable job state without request image bodies.
ImageJobUpdate
Mutable gallery fields for one retained durable job.
ImagePreset
Persisted named preset.
ImagePresetCreate
Create payload for a named preset.
ImagePresetPage
Cursor-paginated preset collection.
ImagePresetTemplate
Complete reusable request configuration, excluding image inputs and idempotency keys.
ImagePresetWrite
Full replacement payload for a preset.
ImageRequest
A complete provider-neutral image request.
ImageResponse
Complete normalized response.
ImageSize
Image size represented as auto or WIDTHxHEIGHT.
InputCapabilities
Input-image constraints.
NegotiatedRequest
Request after provider capability negotiation.
Normalization
One explicit normalization or fallback applied to a request.
OutputOptions
Output delivery controls.
ProviderAttempt
Redaction-safe execution trace for one provider route.
ProviderCapabilities
Complete capability declaration for one provider/model pair.
ProviderContext
Runtime metadata and cancellation propagated into a provider call.
ProviderDescriptor
Provider identity shown in discovery endpoints.
ProviderRoute
One explicit provider/model fallback route.
RequestLimits
Configurable limits applied before provider negotiation.
RequestPolicies
Explicit fallback and visibility controls.
RoutingOptions
Provider selection controls.
SessionMetadata
Session information returned after a request.
SessionOptions
Conversation/session controls.
SizeCapabilities
Explicit-size constraints for a provider or model.
Timings
Stage timings in milliseconds.
TransparencyOptions
Transparent-background implementation and matte controls.
U8Range
Inclusive range for a small integer parameter.
Usage
Optional provider usage accounting.
ValidationIssue
One intrinsic validation issue.

Enums§

ArtifactCollisionPolicy
Atomic behavior when an explicit artifact filename already exists.
ArtifactMetadataPolicy
Optional portable generation-metadata persistence policy.
Background
Requested background behavior.
BatchExecution
Preferred execution shape for bridge-emulated multi-image fan-out.
BatchMode
How a provider fulfills a request for more than one output image.
CompatibilityMode
Compatibility policy used during provider negotiation.
ContractMessage
All top-level native messages represented as one versioned JSON Schema.
ErrorCode
Stable machine-readable error classification.
FallbackPolicy
Conditions under which an ordered provider fallback may run.
ImageAction
Image-generation tool action for conversational transports.
ImageJobStatus
Durable lifecycle state for one asynchronous image operation.
ImageOperation
Operation-specific image inputs.
ImagePayload
Generated output payload.
ImageSource
Supported image input locations.
InputFidelity
Fidelity used when processing image inputs.
Moderation
Provider moderation strictness where configurable.
MultiImageFailurePolicy
Behavior when one output in a multi-image request fails.
NegativePromptMode
Handling policy for a negative prompt.
OutputFormat
Encoded output image format.
PresetOperation
Operation selected by a preset without retaining source image bytes.
ProviderAttemptOutcome
Outcome of one ordered provider route attempt.
ProviderEvent
Incremental provider progress.
Quality
Requested generation quality.
Resolution
Coarse output resolution hint.
ResponseFormat
Desired output payload representation.
RevisedPromptPolicy
Visibility and requirement policy for an upstream revised prompt.
SessionMode
Codex conversation behavior for a request.
SupportLevel
Degree to which a provider supports a semantic feature.
TransparencyMode
How a transparent-background result is produced.

Constants§

CONTRACT_VERSION
Current native wire-contract version.

Traits§

ImageProvider
Provider-neutral image backend.

Functions§

contract_schema
Generates the current native contract schema.
negotiate_request
Negotiates one intrinsically valid request against provider capabilities.
validate_preset_name
Validates a preset resource name.
validate_preset_write
Validates bounded preset metadata independent of provider capabilities.
validate_request
Validates a request before any provider or I/O work occurs.
validation_issues
Returns all intrinsic issues in deterministic field order.

Type Aliases§

ProviderEventStream
Stream returned by providers that expose incremental progress.