enigma_rtc/error.rs
1use thiserror::Error;
2
3pub type RtcResult<T> = Result<T, EnigmaRtcError>;
4
5#[derive(Debug, Error)]
6pub enum EnigmaRtcError {
7 #[error("invalid call state for this operation")]
8 InvalidState,
9 #[error("invalid session description")]
10 InvalidSdp,
11 #[error("invalid ice candidate")]
12 InvalidCandidate,
13 #[error("webrtc error: {0}")]
14 WebRtcError(String),
15 #[error("json error: {0}")]
16 JsonError(String),
17 #[error("event channel closed")]
18 ChannelClosed,
19}