pub struct ResponseEventBuilder { /* private fields */ }Expand description
Reusable context for response-scoped server events.
Holds response_id. Terminal methods take event_id per call, so the
builder can be reused across many events in a streaming loop.
Call .for_item() to descend into item-scoped events.
Implementations§
Source§impl ResponseEventBuilder
impl ResponseEventBuilder
Sourcepub fn for_item(
&self,
item_id: impl Into<String>,
output_index: u32,
) -> ItemEventBuilder
pub fn for_item( &self, item_id: impl Into<String>, output_index: u32, ) -> ItemEventBuilder
Descend into item-scoped events.
Sourcepub fn output_audio_buffer_started(
&self,
event_id: impl Into<String>,
) -> ServerEvent
pub fn output_audio_buffer_started( &self, event_id: impl Into<String>, ) -> ServerEvent
Build an output_audio_buffer.started event.
Sourcepub fn output_audio_buffer_stopped(
&self,
event_id: impl Into<String>,
) -> ServerEvent
pub fn output_audio_buffer_stopped( &self, event_id: impl Into<String>, ) -> ServerEvent
Build an output_audio_buffer.stopped event.
Sourcepub fn output_audio_buffer_cleared(
&self,
event_id: impl Into<String>,
) -> ServerEvent
pub fn output_audio_buffer_cleared( &self, event_id: impl Into<String>, ) -> ServerEvent
Build an output_audio_buffer.cleared event.
Trait Implementations§
Source§impl Clone for ResponseEventBuilder
impl Clone for ResponseEventBuilder
Source§fn clone(&self) -> ResponseEventBuilder
fn clone(&self) -> ResponseEventBuilder
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 ResponseEventBuilder
impl RefUnwindSafe for ResponseEventBuilder
impl Send for ResponseEventBuilder
impl Sync for ResponseEventBuilder
impl Unpin for ResponseEventBuilder
impl UnsafeUnpin for ResponseEventBuilder
impl UnwindSafe for ResponseEventBuilder
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