pub struct ImagePresetTemplate {
pub prompt: Option<String>,
pub negative_prompt: Option<String>,
pub operation: PresetOperation,
pub parameters: GenerationParameters,
pub routing: RoutingOptions,
pub session: SessionOptions,
pub output: OutputOptions,
pub policies: RequestPolicies,
pub timeout_ms: Option<u64>,
pub user: Option<String>,
}Expand description
Complete reusable request configuration, excluding image inputs and idempotency keys.
Fields§
§prompt: Option<String>Optional reusable prompt. A caller may replace it when applying the preset.
negative_prompt: Option<String>Optional reusable negative prompt.
operation: PresetOperationGenerate or edit operation; image inputs are always supplied at execution time.
parameters: GenerationParametersImage generation parameters.
routing: RoutingOptionsProvider and fallback routing.
session: SessionOptionsConversation behavior.
output: OutputOptionsArtifact and response configuration.
policies: RequestPoliciesCompatibility and prompt policies.
timeout_ms: Option<u64>Optional request deadline in milliseconds.
user: Option<String>Optional opaque end-user identifier.
Implementations§
Source§impl ImagePresetTemplate
impl ImagePresetTemplate
Sourcepub fn from_request(request: &ImageRequest) -> Self
pub fn from_request(request: &ImageRequest) -> Self
Captures reusable configuration from a request while dropping image inputs and idempotency.
Sourcepub fn request(
&self,
prompt: Option<String>,
) -> Result<ImageRequest, BridgeError>
pub fn request( &self, prompt: Option<String>, ) -> Result<ImageRequest, BridgeError>
Builds an input-free request, using prompt before the stored prompt when supplied.
Trait Implementations§
Source§impl Clone for ImagePresetTemplate
impl Clone for ImagePresetTemplate
Source§fn clone(&self) -> ImagePresetTemplate
fn clone(&self) -> ImagePresetTemplate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImagePresetTemplate
impl Debug for ImagePresetTemplate
Source§impl Default for ImagePresetTemplate
impl Default for ImagePresetTemplate
Source§impl<'de> Deserialize<'de> for ImagePresetTemplatewhere
ImagePresetTemplate: Default,
impl<'de> Deserialize<'de> for ImagePresetTemplatewhere
ImagePresetTemplate: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ImagePresetTemplate
Source§impl JsonSchema for ImagePresetTemplate
impl JsonSchema for ImagePresetTemplate
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ImagePresetTemplate
impl PartialEq for ImagePresetTemplate
Source§impl Serialize for ImagePresetTemplate
impl Serialize for ImagePresetTemplate
impl StructuralPartialEq for ImagePresetTemplate
Auto Trait Implementations§
impl Freeze for ImagePresetTemplate
impl RefUnwindSafe for ImagePresetTemplate
impl Send for ImagePresetTemplate
impl Sync for ImagePresetTemplate
impl Unpin for ImagePresetTemplate
impl UnsafeUnpin for ImagePresetTemplate
impl UnwindSafe for ImagePresetTemplate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more