pub struct StreamingClient { /* private fields */ }Implementations§
Source§impl StreamingClient
impl StreamingClient
pub fn new(api_key: impl Into<String>) -> Self
pub fn builder(api_key: impl Into<String>) -> StreamingClientBuilder
pub fn with_base_url( api_key: impl Into<String>, base_url: impl Into<String>, ) -> Self
pub async fn stream_response( &self, request: CreateResponseBody, ) -> Result<impl Stream<Item = Result<StreamingEvent, StreamingError>>, StreamingError>
pub async fn stream_response_lines( &self, request: CreateResponseBody, ) -> Result<impl Stream<Item = Result<String, StreamingError>>, StreamingError>
Trait Implementations§
Source§impl Clone for StreamingClient
impl Clone for StreamingClient
Source§fn clone(&self) -> StreamingClient
fn clone(&self) -> StreamingClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StreamingClient
impl !RefUnwindSafe for StreamingClient
impl Send for StreamingClient
impl Sync for StreamingClient
impl Unpin for StreamingClient
impl !UnwindSafe for StreamingClient
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