pub enum InputItem {
Text {
text: String,
},
Image {
url: String,
},
LocalImage {
path: String,
},
Skill {
name: String,
path: String,
},
Mention {
name: String,
path: String,
},
}Expand description
One item accepted by a turn or steering request.
Variants§
Implementations§
Source§impl InputItem
impl InputItem
pub fn text(text: impl Into<String>) -> Self
pub fn image(url: impl Into<String>) -> Self
pub fn local_image(path: impl Into<String>) -> Self
pub fn skill(name: impl Into<String>, path: impl Into<String>) -> Self
pub fn mention(name: impl Into<String>, path: impl Into<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for InputItem
impl<'de> Deserialize<'de> for InputItem
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 InputItem
Source§impl From<ImageInput> for InputItem
impl From<ImageInput> for InputItem
Source§fn from(input: ImageInput) -> Self
fn from(input: ImageInput) -> Self
Converts to this type from the input type.
Source§impl From<LocalImageInput> for InputItem
impl From<LocalImageInput> for InputItem
Source§fn from(input: LocalImageInput) -> Self
fn from(input: LocalImageInput) -> Self
Converts to this type from the input type.
Source§impl From<MentionInput> for InputItem
impl From<MentionInput> for InputItem
Source§fn from(input: MentionInput) -> Self
fn from(input: MentionInput) -> Self
Converts to this type from the input type.
Source§impl From<SkillInput> for InputItem
impl From<SkillInput> for InputItem
Source§fn from(input: SkillInput) -> Self
fn from(input: SkillInput) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for InputItem
Auto Trait Implementations§
impl Freeze for InputItem
impl RefUnwindSafe for InputItem
impl Send for InputItem
impl Sync for InputItem
impl Unpin for InputItem
impl UnsafeUnpin for InputItem
impl UnwindSafe for InputItem
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