#[non_exhaustive]pub enum StreamEvent<'a> {
Chunk(&'a str),
Done,
Error(FMError),
}Expand description
One event from a streaming generation.
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.
Chunk(&'a str)
Incremental text delta. Concatenate these to reconstruct the full reply.
Done
Stream finished successfully.
Error(FMError)
Stream failed; the inner error describes why.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for StreamEvent<'a>
impl<'a> RefUnwindSafe for StreamEvent<'a>
impl<'a> Send for StreamEvent<'a>
impl<'a> Sync for StreamEvent<'a>
impl<'a> Unpin for StreamEvent<'a>
impl<'a> UnsafeUnpin for StreamEvent<'a>
impl<'a> UnwindSafe for StreamEvent<'a>
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