pub struct RoomClient { /* private fields */ }Implementations§
Source§impl RoomClient
impl RoomClient
Sourcepub fn with_api_key(host: &str, api_key: &str, api_secret: &str) -> Self
pub fn with_api_key(host: &str, api_key: &str, api_secret: &str) -> Self
Authenticates with an API key and secret, signing a short-lived token per request.
Sourcepub fn with_token(host: &str, token: &str) -> Self
pub fn with_token(host: &str, token: &str) -> Self
Authenticates with a pre-signed token, sent verbatim on every request.
Sourcepub fn new(host: &str) -> ServiceResult<Self>
pub fn new(host: &str) -> ServiceResult<Self>
Reads the API key and secret from the LIVEKIT_API_KEY and
LIVEKIT_API_SECRET environment variables.
Sourcepub fn with_failover(self, enabled: bool) -> Self
pub fn with_failover(self, enabled: bool) -> Self
Enables or disables region failover (enabled by default). Failover only engages for LiveKit Cloud hosts.
Sourcepub fn with_request_timeout(self, timeout: Duration) -> Self
pub fn with_request_timeout(self, timeout: Duration) -> Self
Overrides the default per-request timeout (10s) for calls on this client.
pub async fn create_room( &self, name: &str, options: CreateRoomOptions, ) -> ServiceResult<Room>
Sourcepub async fn create_room_with_playout_delay(
&self,
name: &str,
options: CreateRoomOptions,
min_playout_delay: u32,
max_playout_delay: u32,
) -> ServiceResult<Room>
pub async fn create_room_with_playout_delay( &self, name: &str, options: CreateRoomOptions, min_playout_delay: u32, max_playout_delay: u32, ) -> ServiceResult<Room>
Create a room with an explicit subscriber playout delay.
pub async fn list_rooms(&self, names: Vec<String>) -> ServiceResult<Vec<Room>>
pub async fn delete_room(&self, room: &str) -> ServiceResult<()>
pub async fn update_room_metadata( &self, room: &str, metadata: &str, ) -> ServiceResult<Room>
pub async fn list_participants( &self, room: &str, ) -> ServiceResult<Vec<ParticipantInfo>>
pub async fn get_participant( &self, room: &str, identity: &str, ) -> ServiceResult<ParticipantInfo>
pub async fn remove_participant( &self, room: &str, identity: &str, ) -> ServiceResult<()>
pub async fn remove_participant_with_options( &self, room: &str, identity: &str, options: RemoveParticipantOptions, ) -> ServiceResult<()>
pub async fn forward_participant( &self, room: &str, identity: &str, destination_room: &str, ) -> ServiceResult<()>
pub async fn move_participant( &self, room: &str, identity: &str, destination_room: &str, ) -> ServiceResult<()>
pub async fn mute_published_track( &self, room: &str, identity: &str, track_sid: &str, muted: bool, ) -> ServiceResult<TrackInfo>
pub async fn update_participant( &self, room: &str, identity: &str, options: UpdateParticipantOptions, ) -> ServiceResult<ParticipantInfo>
pub async fn update_subscriptions( &self, room: &str, identity: &str, track_sids: Vec<String>, subscribe: bool, ) -> ServiceResult<()>
pub async fn send_data( &self, room: &str, data: Vec<u8>, options: SendDataOptions, ) -> ServiceResult<()>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RoomClient
impl !UnwindSafe for RoomClient
impl Freeze for RoomClient
impl Send for RoomClient
impl Sync for RoomClient
impl Unpin for RoomClient
impl UnsafeUnpin for RoomClient
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