#[non_exhaustive]pub enum KnownPartKind {
Text,
Image,
File,
ToolResult,
Thinking,
}Expand description
A known portable interpretation of a PartKind.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
Ordinary text.
Image
Image content.
File
File content.
ToolResult
Model-facing tool-result content.
Thinking
Reasoning or thinking replayed to the model.
Implementations§
Source§impl KnownPartKind
impl KnownPartKind
Sourcepub const fn as_part_kind(self) -> PartKind
pub const fn as_part_kind(self) -> PartKind
Returns the canonical numeric kind carrying this interpretation.
The inverse of PartKind::known, and the supported way to spell one of
the five as a PartKind. It introduces no second representation: the
value is the one PartKind::from_i64 would have produced, so
kind.as_part_kind().known() is Some(kind) for every variant.
Trait Implementations§
Source§impl Clone for KnownPartKind
impl Clone for KnownPartKind
impl Copy for KnownPartKind
Source§impl Debug for KnownPartKind
impl Debug for KnownPartKind
impl Eq for KnownPartKind
Source§impl Hash for KnownPartKind
impl Hash for KnownPartKind
Source§impl Ord for KnownPartKind
impl Ord for KnownPartKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for KnownPartKind
impl PartialEq for KnownPartKind
Source§impl PartialOrd for KnownPartKind
impl PartialOrd for KnownPartKind
impl StructuralPartialEq for KnownPartKind
Auto Trait Implementations§
impl Freeze for KnownPartKind
impl RefUnwindSafe for KnownPartKind
impl Send for KnownPartKind
impl Sync for KnownPartKind
impl Unpin for KnownPartKind
impl UnsafeUnpin for KnownPartKind
impl UnwindSafe for KnownPartKind
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