pub struct RTCError {
pub error_detail: RTCErrorDetailType,
pub message: String,
pub sdp_line_number: Option<u32>,
pub sctp_cause_code: Option<u16>,
pub received_alert: Option<u8>,
pub sent_alert: Option<u8>,
}Expand description
W3C RTCError: an OperationError with WebRTC detail (webrtc-pc section 11.1).
Each optional member is set only for the error_detail the spec
gives it to, and is None (the IDL’s null) otherwise.
Fields§
§error_detail: RTCErrorDetailTypeerrorDetail.
message: StringThe error’s message.
sdp_line_number: Option<u32>sdpLineNumber: for sdp-syntax-error, the line (from 1) the error is on.
sctp_cause_code: Option<u16>sctpCauseCode: for sctp-failure, the SCTP cause code (RFC 9260 section 3.3.10) of
the failure.
received_alert: Option<u8>receivedAlert: for dtls-failure, the fatal DTLS alert received.
sent_alert: Option<u8>sentAlert: for dtls-failure, the fatal DTLS alert sent.
Implementations§
Source§impl RTCError
impl RTCError
Sourcepub fn new(error_detail: RTCErrorDetailType, message: impl Into<String>) -> Self
pub fn new(error_detail: RTCErrorDetailType, message: impl Into<String>) -> Self
An error of error_detail with no optional member set.
Sourcepub fn from_error(error: &Error) -> Option<Self>
pub fn from_error(error: &Error) -> Option<Self>
The RTCError an API layer rejects with for error, when it is one the W3C reports
as an RTCError; None for an error the W3C reports otherwise (a TypeError, an
InvalidStateError, …).
A description that does not parse (Error::SdpSyntaxError) is sdp-syntax-error
with its line number.
Trait Implementations§
impl Eq for RTCError
Source§impl Error for RTCError
impl Error for RTCError
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()
impl StructuralPartialEq for RTCError
Auto Trait Implementations§
impl Forget for RTCError
impl Freeze for RTCError
impl Move for RTCError
impl RefUnwindSafe for RTCError
impl Send for RTCErrorwhere
RawVecInner: Send,
impl Sync for RTCErrorwhere
RawVecInner: Sync,
impl Unpin for RTCError
impl UnsafeUnpin for RTCError
impl UnwindSafe for RTCErrorwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.