pub struct GeminiToChatStream { /* private fields */ }Implementations§
Source§impl GeminiToChatStream
impl GeminiToChatStream
pub fn new( context: GeminiToChatContext, flow: IdentityFlow, limits: StreamLimits, ) -> Result<Self, TransformError>
pub fn new_with_policy( context: GeminiToChatContext, flow: IdentityFlow, limits: StreamLimits, policy: TargetIdPolicy, ) -> Result<Self, TransformError>
pub fn identities(&self) -> &IdentityFlow
pub fn push( &mut self, chunk: GenerateContentResponseBody, ) -> Result<Converted<Vec<ChatCompletionChunk>>, TransformError>
pub fn finish(self) -> Result<StreamEnd<ChatCompletionChunk>, TransformError>
Trait Implementations§
Source§impl StreamBridge for GeminiToChatStream
impl StreamBridge for GeminiToChatStream
type NativeEvent = GenerateContentResponseBody
type ClientEvent = ChatCompletionChunk
type NativeRequest = GenerateContentRequestBody
type ClientRequest = GenerateContentRequestBody
fn identities(&self) -> &IdentityFlow
fn push( &mut self, event: Self::NativeEvent, ) -> Result<Converted<Vec<Self::ClientEvent>>, TransformError>
fn finish(self) -> Result<BridgeEnd<Self::ClientEvent>, TransformError>
fn push_done(&mut self) -> Result<(), TransformError>
Auto Trait Implementations§
impl Freeze for GeminiToChatStream
impl RefUnwindSafe for GeminiToChatStream
impl Send for GeminiToChatStream
impl Sync for GeminiToChatStream
impl Unpin for GeminiToChatStream
impl UnsafeUnpin for GeminiToChatStream
impl UnwindSafe for GeminiToChatStream
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