pub enum PollEvent {
Ready(Option<RealtimeEvent>),
Pending,
}Expand description
Result of a non-blocking RealtimeLlm::poll_event poll.
The S2S reader uses this to avoid holding the realtime session lock across a
blocking next_event().await — which would starve send_audio (caller audio
in) for the entire gap between bot turns and deadlock the call. The reader
instead polls (brief lock), and on PollEvent::Pending awaits
RealtimeLlm::event_notify with no lock held, so send_audio runs.
Variants§
Ready(Option<RealtimeEvent>)
An event (or None = session closed) is ready now.
Pending
No event is ready; await event_notify() then poll again.
Auto Trait Implementations§
impl Freeze for PollEvent
impl RefUnwindSafe for PollEvent
impl Send for PollEvent
impl Sync for PollEvent
impl Unpin for PollEvent
impl UnsafeUnpin for PollEvent
impl UnwindSafe for PollEvent
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