#[non_exhaustive]pub enum ProviderError {
SigninRequired,
Refused {
code: String,
detail: Value,
},
Unavailable {
retry_after_ms: Option<u64>,
},
ConsentRequired(Box<ConsentRequired>),
Other(String),
}Expand description
Why the host could not join.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SigninRequired
The host has no Sew session (the call ends with signin_required).
Refused
Sew refused the join (code and detail passed through to the errors event).
Sew or the host is unavailable; retry after retry_after_ms when given.
ConsentRequired(Box<ConsentRequired>)
Sew’s 409 recording_consent_required (Sew 0.7.3): the room is recorded and the
person has not answered its current notice. A join holds the call at
consent_required until the host answers (crate::Call::consent) or leaves.
Other(String)
Anything else.
Implementations§
Source§impl ProviderError
impl ProviderError
Sourcepub fn from_sew_error(
status: u16,
retry_after_ms: Option<u64>,
body: &[u8],
) -> ProviderError
pub fn from_sew_error( status: u16, retry_after_ms: Option<u64>, body: &[u8], ) -> ProviderError
Sew’s error answer as the engine reads it: 401 is ProviderError::SigninRequired;
409 recording_consent_required with a prompt is ProviderError::ConsentRequired;
429 and 5xx are ProviderError::Unavailable (with retry_after_ms, from
Retry-After); anything else is ProviderError::Refused with error.details.reason
(else error.code, else http_<status>) and error.details. A host’s server route that
returns Sew’s error body unchanged is read the same way.
Trait Implementations§
Source§impl Clone for ProviderError
impl Clone for ProviderError
Source§impl Debug for ProviderError
impl Debug for ProviderError
Source§impl Display for ProviderError
impl Display for ProviderError
Source§impl Error for ProviderError
impl Error for ProviderError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ProviderError> for CallError
impl From<ProviderError> for CallError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Source§impl PartialEq for ProviderError
impl PartialEq for ProviderError
impl StructuralPartialEq for ProviderError
Auto Trait Implementations§
impl Forget for ProviderError
impl Freeze for ProviderError
impl Move for ProviderError
impl RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin for ProviderError
impl UnsafeUnpin for ProviderError
impl UnwindSafe for ProviderError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CryptoSafe for T
impl<T> CryptoSafe for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more