pub struct WebhookQueue { /* private fields */ }Expand description
Pending webhook messages that the gateway loop should pick up.
Implementations§
Source§impl WebhookQueue
impl WebhookQueue
pub fn new() -> Self
Sourcepub fn enqueue_wake(
&mut self,
reason: Option<String>,
session_id: Option<String>,
)
pub fn enqueue_wake( &mut self, reason: Option<String>, session_id: Option<String>, )
Enqueue a wake event.
Sourcepub fn enqueue_agent_message(
&mut self,
message: String,
agent_id: Option<String>,
metadata: Option<Value>,
)
pub fn enqueue_agent_message( &mut self, message: String, agent_id: Option<String>, metadata: Option<Value>, )
Enqueue an agent message.
Sourcepub fn drain(&mut self) -> Vec<PendingWebhook>
pub fn drain(&mut self) -> Vec<PendingWebhook>
Drain all pending webhooks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebhookQueue
impl RefUnwindSafe for WebhookQueue
impl Send for WebhookQueue
impl Sync for WebhookQueue
impl Unpin for WebhookQueue
impl UnsafeUnpin for WebhookQueue
impl UnwindSafe for WebhookQueue
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