pub struct ImageArtifact {
pub artifact_type: String,
pub src: String,
pub alt: Option<String>,
pub caption: Option<String>,
pub width: Option<u32>,
pub height: Option<u32>,
/* private fields */
}Fields§
§artifact_type: String§src: String§alt: Option<String>§caption: Option<String>§width: Option<u32>§height: Option<u32>Implementations§
Source§impl ImageArtifact
impl ImageArtifact
pub fn new(src: impl Into<String>, ctx: &RequestContext) -> Self
pub fn with_alt(self, alt: impl Into<String>) -> Self
pub fn with_caption(self, caption: impl Into<String>) -> Self
pub const fn with_dimensions(self, width: u32, height: u32) -> Self
pub fn with_execution_id(self, id: impl Into<String>) -> Self
pub fn with_skill( self, skill_id: impl Into<SkillId>, skill_name: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl Artifact for ImageArtifact
impl Artifact for ImageArtifact
fn artifact_type(&self) -> ArtifactType
fn to_schema(&self) -> JsonValue
fn to_json_value(&self) -> JsonValue
Source§impl Clone for ImageArtifact
impl Clone for ImageArtifact
Source§fn clone(&self) -> ImageArtifact
fn clone(&self) -> ImageArtifact
Returns a duplicate of the value. Read more
1.0.0 · 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 ImageArtifact
impl Debug for ImageArtifact
Source§impl<'de> Deserialize<'de> for ImageArtifact
impl<'de> Deserialize<'de> for ImageArtifact
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
Source§impl JsonSchema for ImageArtifact
impl JsonSchema for ImageArtifact
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 moreAuto Trait Implementations§
impl Freeze for ImageArtifact
impl RefUnwindSafe for ImageArtifact
impl Send for ImageArtifact
impl Sync for ImageArtifact
impl Unpin for ImageArtifact
impl UnwindSafe for ImageArtifact
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