pub struct LiveSession {
pub session_id: Option<String>,
/* private fields */
}Expand description
Live 会话。
Fields§
§session_id: Option<String>Implementations§
Source§impl LiveSession
impl LiveSession
Sourcepub async fn send_client_content(
&self,
params: LiveSendClientContentParameters,
) -> Result<()>
pub async fn send_client_content( &self, params: LiveSendClientContentParameters, ) -> Result<()>
Sourcepub async fn send_realtime_input(
&self,
params: LiveSendRealtimeInputParameters,
) -> Result<()>
pub async fn send_realtime_input( &self, params: LiveSendRealtimeInputParameters, ) -> Result<()>
Sourcepub async fn send_tool_response(
&self,
params: LiveSendToolResponseParameters,
) -> Result<()>
pub async fn send_tool_response( &self, params: LiveSendToolResponseParameters, ) -> Result<()>
Sourcepub async fn receive(&mut self) -> Option<Result<LiveServerMessage>>
pub async fn receive(&mut self) -> Option<Result<LiveServerMessage>>
接收服务器消息。
Sourcepub fn resumption_state(&self) -> LiveSessionResumptionState
pub fn resumption_state(&self) -> LiveSessionResumptionState
获取最新的会话恢复状态。
Sourcepub fn resumption_handle(&self) -> Option<String>
pub fn resumption_handle(&self) -> Option<String>
获取最新的 resumption handle。
Sourcepub fn last_go_away_time_left(&self) -> Option<String>
pub fn last_go_away_time_left(&self) -> Option<String>
获取最近一次 GoAway 的 time_left。
Auto Trait Implementations§
impl Freeze for LiveSession
impl !RefUnwindSafe for LiveSession
impl Send for LiveSession
impl Sync for LiveSession
impl Unpin for LiveSession
impl UnsafeUnpin for LiveSession
impl !UnwindSafe for LiveSession
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