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 */
}Available on crate feature
core only.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 const ARTIFACT_TYPE_STR: &'static str = "image"
pub fn new(src: impl Into<String>, ctx: &RequestContext) -> ImageArtifact
pub fn with_alt(self, alt: impl Into<String>) -> ImageArtifact
pub fn with_caption(self, caption: impl Into<String>) -> ImageArtifact
pub const fn with_dimensions(self, width: u32, height: u32) -> ImageArtifact
pub fn with_execution_id(self, id: impl Into<String>) -> ImageArtifact
pub fn with_skill( self, skill_id: impl Into<SkillId>, skill_name: impl Into<String>, ) -> ImageArtifact
Trait Implementations§
Source§impl Artifact for ImageArtifact
impl Artifact for ImageArtifact
fn artifact_type(&self) -> ArtifactType
fn to_schema(&self) -> Value
fn to_json_value(&self) -> Result<Value, Error>
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<ImageArtifact, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ImageArtifact, <__D as Deserializer<'de>>::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 moreSource§impl Serialize for ImageArtifact
impl Serialize for ImageArtifact
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ImageArtifact
impl RefUnwindSafe for ImageArtifact
impl Send for ImageArtifact
impl Sync for ImageArtifact
impl Unpin for ImageArtifact
impl UnsafeUnpin 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