pub struct AgentDispatchClient { /* private fields */ }Implementations§
Source§impl AgentDispatchClient
impl AgentDispatchClient
pub fn with_api_key(host: &str, api_key: &str, api_secret: &str) -> Self
pub fn new(host: &str) -> ServiceResult<Self>
Sourcepub async fn create_dispatch(
&self,
req: CreateAgentDispatchRequest,
) -> ServiceResult<AgentDispatch>
pub async fn create_dispatch( &self, req: CreateAgentDispatchRequest, ) -> ServiceResult<AgentDispatch>
Creates an explicit dispatch for an agent to join a room.
To use explicit dispatch, your agent must be registered with an agent_name.
§Arguments
req- Request containing dispatch creation parameters. The request can include an optionaldeploymentfield to target a specific agent deployment. Leave empty to target the production deployment.
§Returns
The created agent dispatch object
Sourcepub async fn delete_dispatch(
&self,
dispatch_id: impl Into<String>,
room_name: impl Into<String>,
) -> ServiceResult<AgentDispatch>
pub async fn delete_dispatch( &self, dispatch_id: impl Into<String>, room_name: impl Into<String>, ) -> ServiceResult<AgentDispatch>
Sourcepub async fn list_dispatch(
&self,
room_name: impl Into<String>,
) -> ServiceResult<Vec<AgentDispatch>>
pub async fn list_dispatch( &self, room_name: impl Into<String>, ) -> ServiceResult<Vec<AgentDispatch>>
Sourcepub async fn get_dispatch(
&self,
dispatch_id: impl Into<String>,
room_name: impl Into<String>,
) -> ServiceResult<Option<AgentDispatch>>
pub async fn get_dispatch( &self, dispatch_id: impl Into<String>, room_name: impl Into<String>, ) -> ServiceResult<Option<AgentDispatch>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentDispatchClient
impl !UnwindSafe for AgentDispatchClient
impl Freeze for AgentDispatchClient
impl Send for AgentDispatchClient
impl Sync for AgentDispatchClient
impl Unpin for AgentDispatchClient
impl UnsafeUnpin for AgentDispatchClient
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