pub enum FinishReason {
Stop,
Length,
ToolCalls,
ContentFilter,
Custom(String),
}Variants§
Implementations§
Source§impl FinishReason
impl FinishReason
pub fn as_str(&self) -> &str
pub fn from_anthropic_stop(reason: &str) -> Self
pub fn to_anthropic_stop(&self) -> String
Trait Implementations§
Source§impl Clone for FinishReason
impl Clone for FinishReason
Source§fn clone(&self) -> FinishReason
fn clone(&self) -> FinishReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FinishReason
impl Debug for FinishReason
Source§impl<'de> Deserialize<'de> for FinishReason
impl<'de> Deserialize<'de> for FinishReason
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&FinishReason> for GeminiFinishReason
impl From<&FinishReason> for GeminiFinishReason
Source§fn from(r: &FinishReason) -> Self
fn from(r: &FinishReason) -> Self
Converts to this type from the input type.
Source§impl From<&GeminiFinishReason> for FinishReason
impl From<&GeminiFinishReason> for FinishReason
Source§fn from(r: &GeminiFinishReason) -> Self
fn from(r: &GeminiFinishReason) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FinishReason
impl PartialEq for FinishReason
Source§fn eq(&self, other: &FinishReason) -> bool
fn eq(&self, other: &FinishReason) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FinishReason
impl Serialize for FinishReason
impl Eq for FinishReason
impl StructuralPartialEq for FinishReason
Auto Trait Implementations§
impl Freeze for FinishReason
impl RefUnwindSafe for FinishReason
impl Send for FinishReason
impl Sync for FinishReason
impl Unpin for FinishReason
impl UnsafeUnpin for FinishReason
impl UnwindSafe for FinishReason
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