Enum RequestFailure
#[non_exhaustive]pub enum RequestFailure {
Rejected {
request_id: u64,
code: RequestErrorCode,
reason: String,
},
Timeout,
SessionClosed,
Send(TransportSendError),
ProtocolViolation(&'static str),
TrackNotUnderstood,
PublishBlocked,
}Expand description
The session stays open after Rejected and Timeout (draft-14 §12.2).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Rejected
Timeout
SessionClosed
Send(TransportSendError)
ProtocolViolation(&'static str)
TrackNotUnderstood
The track carries a Mandatory Track Property the peer’s draft cannot carry (draft-14 has no Track Properties; draft-18 §2.5.1), so the request was not sent.
PublishBlocked
A PUBLISH for a track the peer’s SUBSCRIBE_TRACKS covers found the peer’s stream limit reached, so PUBLISH_BLOCKED went on that SUBSCRIBE_TRACKS instead, and no PUBLISH for the track may follow on it (draft-18 §6.1 MUST NOT). draft-14 never fails so.
Trait Implementations§
§impl Debug for RequestFailure
impl Debug for RequestFailure
§impl Display for RequestFailure
impl Display for RequestFailure
§impl Error for RequestFailure
impl Error for RequestFailure
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl From<TransportSendError> for RequestFailure
impl From<TransportSendError> for RequestFailure
§fn from(source: TransportSendError) -> RequestFailure
fn from(source: TransportSendError) -> RequestFailure
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RequestFailure
impl RefUnwindSafe for RequestFailure
impl Send for RequestFailure
impl Sync for RequestFailure
impl Unpin for RequestFailure
impl UnsafeUnpin for RequestFailure
impl UnwindSafe for RequestFailure
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