pub enum FinishReason {
Safety,
Recitation,
Other,
}Expand description
Represents the reason why the Gemini API finished generating content.
Variants§
Safety
Indicates that the generation was stopped due to safety concerns.
Recitation
Indicates that the generation was stopped due to content recitation.
Other
Represents any other reason for finishing content generation.
Implementations§
Source§impl FinishReason
impl FinishReason
Sourcepub fn is_block_error(&self) -> bool
pub fn is_block_error(&self) -> bool
Determines if the finish reason is considered a block error.
§Returns
true if the finish reason is either Safety or Recitation, false otherwise.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FinishReason
impl RefUnwindSafe for FinishReason
impl Send for FinishReason
impl Sync for FinishReason
impl Unpin 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