pub struct ItemEventBuilder { /* private fields */ }Expand description
Reusable context for item-scoped server events.
Holds response_id, item_id, and output_index. Terminal methods take
event_id per call. Call .for_content() to descend into content-scoped events.
Implementations§
Source§impl ItemEventBuilder
impl ItemEventBuilder
Sourcepub fn new(
response_id: impl Into<String>,
item_id: impl Into<String>,
output_index: u32,
) -> Self
pub fn new( response_id: impl Into<String>, item_id: impl Into<String>, output_index: u32, ) -> Self
Create a new item-scoped context directly.
Sourcepub fn for_content(&self, content_index: u32) -> ContentEventBuilder
pub fn for_content(&self, content_index: u32) -> ContentEventBuilder
Descend into content-scoped events.
Sourcepub fn output_item_added(
&self,
event_id: impl Into<String>,
item: RealtimeConversationItem,
) -> ServerEvent
pub fn output_item_added( &self, event_id: impl Into<String>, item: RealtimeConversationItem, ) -> ServerEvent
Build a response.output_item.added event.
Sourcepub fn output_item_done(
&self,
event_id: impl Into<String>,
item: RealtimeConversationItem,
) -> ServerEvent
pub fn output_item_done( &self, event_id: impl Into<String>, item: RealtimeConversationItem, ) -> ServerEvent
Build a response.output_item.done event.
Sourcepub fn function_call_arguments_delta(
&self,
event_id: impl Into<String>,
call_id: impl Into<String>,
delta: impl Into<String>,
) -> ServerEvent
pub fn function_call_arguments_delta( &self, event_id: impl Into<String>, call_id: impl Into<String>, delta: impl Into<String>, ) -> ServerEvent
Build a response.function_call_arguments.delta event.
Sourcepub fn function_call_arguments_done(
&self,
event_id: impl Into<String>,
call_id: impl Into<String>,
name: impl Into<String>,
arguments: impl Into<String>,
) -> ServerEvent
pub fn function_call_arguments_done( &self, event_id: impl Into<String>, call_id: impl Into<String>, name: impl Into<String>, arguments: impl Into<String>, ) -> ServerEvent
Build a response.function_call_arguments.done event.
Sourcepub fn mcp_call_arguments_delta(
&self,
event_id: impl Into<String>,
delta: impl Into<String>,
obfuscation: Option<String>,
) -> ServerEvent
pub fn mcp_call_arguments_delta( &self, event_id: impl Into<String>, delta: impl Into<String>, obfuscation: Option<String>, ) -> ServerEvent
Build a response.mcp_call_arguments.delta event.
Sourcepub fn mcp_call_arguments_done(
&self,
event_id: impl Into<String>,
arguments: impl Into<String>,
) -> ServerEvent
pub fn mcp_call_arguments_done( &self, event_id: impl Into<String>, arguments: impl Into<String>, ) -> ServerEvent
Build a response.mcp_call_arguments.done event.
Trait Implementations§
Source§impl Clone for ItemEventBuilder
impl Clone for ItemEventBuilder
Source§fn clone(&self) -> ItemEventBuilder
fn clone(&self) -> ItemEventBuilder
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 ItemEventBuilder
impl RefUnwindSafe for ItemEventBuilder
impl Send for ItemEventBuilder
impl Sync for ItemEventBuilder
impl Unpin for ItemEventBuilder
impl UnsafeUnpin for ItemEventBuilder
impl UnwindSafe for ItemEventBuilder
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