pub enum ViewKind {
Text,
Thinking,
ToolCall,
ToolResult,
Resource,
ResourceRef,
PromptRequest,
PromptResult,
Image,
Video,
Audio,
Document,
}Expand description
Type of content a view represents.
Variants§
Text
Thinking
ToolCall
ToolResult
Resource
ResourceRef
PromptRequest
PromptResult
Image
Video
Audio
Document
Implementations§
Source§impl ViewKind
impl ViewKind
Sourcepub fn from_content_type(ct: ContentType) -> Self
pub fn from_content_type(ct: ContentType) -> Self
Map ContentType to ViewKind.
Sourcepub fn default_action(&self, role: Role) -> ViewAction
pub fn default_action(&self, role: Role) -> ViewAction
The default action for this kind of content.
Sourcepub fn is_resource(&self) -> bool
pub fn is_resource(&self) -> bool
Whether this is a resource-related kind.
Trait Implementations§
impl Copy for ViewKind
Source§impl<'de> Deserialize<'de> for ViewKind
impl<'de> Deserialize<'de> for ViewKind
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 ViewKind
impl StructuralPartialEq for ViewKind
Auto Trait Implementations§
impl Freeze for ViewKind
impl RefUnwindSafe for ViewKind
impl Send for ViewKind
impl Sync for ViewKind
impl Unpin for ViewKind
impl UnsafeUnpin for ViewKind
impl UnwindSafe for ViewKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.