pub struct ResponsesWebSocketSessionBuilder<T = Client> { /* private fields */ }Available on non-
target_family=wasm only.Expand description
A builder for an OpenAI Responses WebSocket session.
The default builder applies a 30 second connection timeout and leaves the per-event timeout disabled.
Implementations§
Source§impl<T> ResponsesWebSocketSessionBuilder<T>
impl<T> ResponsesWebSocketSessionBuilder<T>
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Sets the timeout for establishing the websocket connection.
Sourcepub fn without_connect_timeout(self) -> Self
pub fn without_connect_timeout(self) -> Self
Disables the websocket connection timeout.
Sourcepub fn event_timeout(self, timeout: Duration) -> Self
pub fn event_timeout(self, timeout: Duration) -> Self
Sets the timeout for waiting on the next websocket event.
Sourcepub fn without_event_timeout(self) -> Self
pub fn without_event_timeout(self) -> Self
Disables the websocket event timeout.
Source§impl<T> ResponsesWebSocketSessionBuilder<T>
impl<T> ResponsesWebSocketSessionBuilder<T>
Sourcepub async fn connect(
self,
) -> Result<ResponsesWebSocketSession<T>, CompletionError>
pub async fn connect( self, ) -> Result<ResponsesWebSocketSession<T>, CompletionError>
Opens the websocket session using the configured builder options.
Auto Trait Implementations§
impl<T> Freeze for ResponsesWebSocketSessionBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for ResponsesWebSocketSessionBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for ResponsesWebSocketSessionBuilder<T>where
T: Send,
impl<T> Sync for ResponsesWebSocketSessionBuilder<T>where
T: Sync,
impl<T> Unpin for ResponsesWebSocketSessionBuilder<T>where
T: Unpin,
impl<T> UnsafeUnpin for ResponsesWebSocketSessionBuilder<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ResponsesWebSocketSessionBuilder<T>where
T: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more