mod capability;
mod client;
mod connection;
mod credentials_provider;
mod gateway;
mod listener;
mod participant;
mod session;
pub use capability::Capability;
pub use client::Client;
pub use gateway::{Gateway, GatewayHandle};
pub use listener::Listener;
use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
#[allow(clippy::enum_variant_names)]
pub enum RemoteAccessError {
#[error("Stream error: {0}")]
StreamError(String),
#[error("Connection error: {0}")]
RoomError(String),
#[error("Authentication error: {0}")]
AuthError(String),
#[error(transparent)]
IoError(#[from] std::io::Error),
}
impl From<livekit::StreamError> for RemoteAccessError {
fn from(error: livekit::StreamError) -> Self {
match error {
livekit::StreamError::Io(e) => RemoteAccessError::IoError(e),
_ => RemoteAccessError::StreamError(error.to_string()),
}
}
}
impl From<livekit::RoomError> for RemoteAccessError {
fn from(error: livekit::RoomError) -> Self {
RemoteAccessError::RoomError(error.to_string())
}
}