#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u64)]
pub enum SessionErrorCode {
NoError = 0x0,
InternalError = 0x1,
Unauthorized = 0x2,
ProtocolViolation = 0x3,
InvalidRequestId = 0x4,
DuplicateTrackAlias = 0x5,
KeyValueFormattingError = 0x6,
TooManyRequests = 0x7,
InvalidPath = 0x8,
MalformedPath = 0x9,
GoawayTimeout = 0x10,
ControlMessageTimeout = 0x11,
DataStreamTimeout = 0x12,
AuthTokenCacheOverflow = 0x13,
DuplicateAuthTokenAlias = 0x14,
VersionNegotiationFailed = 0x15,
MalformedAuthToken = 0x16,
UnknownAuthTokenAlias = 0x17,
ExpiredAuthToken = 0x18,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u64)]
pub enum SubscribeErrorCode {
InternalError = 0x0,
Unauthorized = 0x1,
Timeout = 0x2,
NotSupported = 0x3,
TrackDoesNotExist = 0x4,
InvalidRange = 0x5,
MalformedAuthToken = 0x10,
ExpiredAuthToken = 0x12,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u64)]
pub enum SubscribeDoneStatusCode {
InternalError = 0x0,
Unauthorized = 0x1,
TrackEnded = 0x2,
SubscriptionEnded = 0x3,
GoingAway = 0x4,
Expired = 0x5,
TooFarBehind = 0x6,
MalformedTrack = 0x7,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u64)]
pub enum PublishErrorCode {
InternalError = 0x0,
Unauthorized = 0x1,
Timeout = 0x2,
NotSupported = 0x3,
Uninterested = 0x4,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u64)]
pub enum FetchErrorCode {
InternalError = 0x0,
Unauthorized = 0x1,
Timeout = 0x2,
NotSupported = 0x3,
TrackDoesNotExist = 0x4,
InvalidRange = 0x5,
NoObjects = 0x6,
InvalidJoiningRequestId = 0x7,
UnknownStatusInRange = 0x8,
MalformedTrack = 0x9,
MalformedAuthToken = 0x10,
ExpiredAuthToken = 0x12,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u64)]
pub enum AnnounceErrorCode {
InternalError = 0x0,
Unauthorized = 0x1,
Timeout = 0x2,
NotSupported = 0x3,
Uninterested = 0x4,
MalformedAuthToken = 0x10,
ExpiredAuthToken = 0x12,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u64)]
pub enum SubscribeNamespaceErrorCode {
InternalError = 0x0,
Unauthorized = 0x1,
Timeout = 0x2,
NotSupported = 0x3,
NamespacePrefixUnknown = 0x4,
NamespacePrefixOverlap = 0x5,
MalformedAuthToken = 0x10,
ExpiredAuthToken = 0x12,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u64)]
pub enum StreamResetErrorCode {
InternalError = 0x0,
Cancelled = 0x1,
DeliveryTimeout = 0x2,
SessionClosed = 0x3,
}
impl SessionErrorCode {
pub const ALL: &[SessionErrorCode] = &[
SessionErrorCode::NoError,
SessionErrorCode::InternalError,
SessionErrorCode::Unauthorized,
SessionErrorCode::ProtocolViolation,
SessionErrorCode::InvalidRequestId,
SessionErrorCode::DuplicateTrackAlias,
SessionErrorCode::KeyValueFormattingError,
SessionErrorCode::TooManyRequests,
SessionErrorCode::InvalidPath,
SessionErrorCode::MalformedPath,
SessionErrorCode::GoawayTimeout,
SessionErrorCode::ControlMessageTimeout,
SessionErrorCode::DataStreamTimeout,
SessionErrorCode::AuthTokenCacheOverflow,
SessionErrorCode::DuplicateAuthTokenAlias,
SessionErrorCode::VersionNegotiationFailed,
SessionErrorCode::MalformedAuthToken,
SessionErrorCode::UnknownAuthTokenAlias,
SessionErrorCode::ExpiredAuthToken,
];
pub fn from_u64(v: u64) -> Option<Self> {
match v {
0x0 => Some(SessionErrorCode::NoError),
0x1 => Some(SessionErrorCode::InternalError),
0x2 => Some(SessionErrorCode::Unauthorized),
0x3 => Some(SessionErrorCode::ProtocolViolation),
0x4 => Some(SessionErrorCode::InvalidRequestId),
0x5 => Some(SessionErrorCode::DuplicateTrackAlias),
0x6 => Some(SessionErrorCode::KeyValueFormattingError),
0x7 => Some(SessionErrorCode::TooManyRequests),
0x8 => Some(SessionErrorCode::InvalidPath),
0x9 => Some(SessionErrorCode::MalformedPath),
0x10 => Some(SessionErrorCode::GoawayTimeout),
0x11 => Some(SessionErrorCode::ControlMessageTimeout),
0x12 => Some(SessionErrorCode::DataStreamTimeout),
0x13 => Some(SessionErrorCode::AuthTokenCacheOverflow),
0x14 => Some(SessionErrorCode::DuplicateAuthTokenAlias),
0x15 => Some(SessionErrorCode::VersionNegotiationFailed),
0x16 => Some(SessionErrorCode::MalformedAuthToken),
0x17 => Some(SessionErrorCode::UnknownAuthTokenAlias),
0x18 => Some(SessionErrorCode::ExpiredAuthToken),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}
impl SubscribeErrorCode {
pub const ALL: &[SubscribeErrorCode] = &[
SubscribeErrorCode::InternalError,
SubscribeErrorCode::Unauthorized,
SubscribeErrorCode::Timeout,
SubscribeErrorCode::NotSupported,
SubscribeErrorCode::TrackDoesNotExist,
SubscribeErrorCode::InvalidRange,
SubscribeErrorCode::MalformedAuthToken,
SubscribeErrorCode::ExpiredAuthToken,
];
pub fn from_u64(v: u64) -> Option<Self> {
match v {
0x0 => Some(SubscribeErrorCode::InternalError),
0x1 => Some(SubscribeErrorCode::Unauthorized),
0x2 => Some(SubscribeErrorCode::Timeout),
0x3 => Some(SubscribeErrorCode::NotSupported),
0x4 => Some(SubscribeErrorCode::TrackDoesNotExist),
0x5 => Some(SubscribeErrorCode::InvalidRange),
0x10 => Some(SubscribeErrorCode::MalformedAuthToken),
0x12 => Some(SubscribeErrorCode::ExpiredAuthToken),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}
impl SubscribeDoneStatusCode {
pub const ALL: &[SubscribeDoneStatusCode] = &[
SubscribeDoneStatusCode::InternalError,
SubscribeDoneStatusCode::Unauthorized,
SubscribeDoneStatusCode::TrackEnded,
SubscribeDoneStatusCode::SubscriptionEnded,
SubscribeDoneStatusCode::GoingAway,
SubscribeDoneStatusCode::Expired,
SubscribeDoneStatusCode::TooFarBehind,
SubscribeDoneStatusCode::MalformedTrack,
];
pub fn from_u64(v: u64) -> Option<Self> {
match v {
0x0 => Some(SubscribeDoneStatusCode::InternalError),
0x1 => Some(SubscribeDoneStatusCode::Unauthorized),
0x2 => Some(SubscribeDoneStatusCode::TrackEnded),
0x3 => Some(SubscribeDoneStatusCode::SubscriptionEnded),
0x4 => Some(SubscribeDoneStatusCode::GoingAway),
0x5 => Some(SubscribeDoneStatusCode::Expired),
0x6 => Some(SubscribeDoneStatusCode::TooFarBehind),
0x7 => Some(SubscribeDoneStatusCode::MalformedTrack),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}
impl PublishErrorCode {
pub const ALL: &[PublishErrorCode] = &[
PublishErrorCode::InternalError,
PublishErrorCode::Unauthorized,
PublishErrorCode::Timeout,
PublishErrorCode::NotSupported,
PublishErrorCode::Uninterested,
];
pub fn from_u64(v: u64) -> Option<Self> {
match v {
0x0 => Some(PublishErrorCode::InternalError),
0x1 => Some(PublishErrorCode::Unauthorized),
0x2 => Some(PublishErrorCode::Timeout),
0x3 => Some(PublishErrorCode::NotSupported),
0x4 => Some(PublishErrorCode::Uninterested),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}
impl FetchErrorCode {
pub const ALL: &[FetchErrorCode] = &[
FetchErrorCode::InternalError,
FetchErrorCode::Unauthorized,
FetchErrorCode::Timeout,
FetchErrorCode::NotSupported,
FetchErrorCode::TrackDoesNotExist,
FetchErrorCode::InvalidRange,
FetchErrorCode::NoObjects,
FetchErrorCode::InvalidJoiningRequestId,
FetchErrorCode::UnknownStatusInRange,
FetchErrorCode::MalformedTrack,
FetchErrorCode::MalformedAuthToken,
FetchErrorCode::ExpiredAuthToken,
];
pub fn from_u64(v: u64) -> Option<Self> {
match v {
0x0 => Some(FetchErrorCode::InternalError),
0x1 => Some(FetchErrorCode::Unauthorized),
0x2 => Some(FetchErrorCode::Timeout),
0x3 => Some(FetchErrorCode::NotSupported),
0x4 => Some(FetchErrorCode::TrackDoesNotExist),
0x5 => Some(FetchErrorCode::InvalidRange),
0x6 => Some(FetchErrorCode::NoObjects),
0x7 => Some(FetchErrorCode::InvalidJoiningRequestId),
0x8 => Some(FetchErrorCode::UnknownStatusInRange),
0x9 => Some(FetchErrorCode::MalformedTrack),
0x10 => Some(FetchErrorCode::MalformedAuthToken),
0x12 => Some(FetchErrorCode::ExpiredAuthToken),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}
impl AnnounceErrorCode {
pub const ALL: &[AnnounceErrorCode] = &[
AnnounceErrorCode::InternalError,
AnnounceErrorCode::Unauthorized,
AnnounceErrorCode::Timeout,
AnnounceErrorCode::NotSupported,
AnnounceErrorCode::Uninterested,
AnnounceErrorCode::MalformedAuthToken,
AnnounceErrorCode::ExpiredAuthToken,
];
pub fn from_u64(v: u64) -> Option<Self> {
match v {
0x0 => Some(AnnounceErrorCode::InternalError),
0x1 => Some(AnnounceErrorCode::Unauthorized),
0x2 => Some(AnnounceErrorCode::Timeout),
0x3 => Some(AnnounceErrorCode::NotSupported),
0x4 => Some(AnnounceErrorCode::Uninterested),
0x10 => Some(AnnounceErrorCode::MalformedAuthToken),
0x12 => Some(AnnounceErrorCode::ExpiredAuthToken),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}
impl SubscribeNamespaceErrorCode {
pub const ALL: &[SubscribeNamespaceErrorCode] = &[
SubscribeNamespaceErrorCode::InternalError,
SubscribeNamespaceErrorCode::Unauthorized,
SubscribeNamespaceErrorCode::Timeout,
SubscribeNamespaceErrorCode::NotSupported,
SubscribeNamespaceErrorCode::NamespacePrefixUnknown,
SubscribeNamespaceErrorCode::NamespacePrefixOverlap,
SubscribeNamespaceErrorCode::MalformedAuthToken,
SubscribeNamespaceErrorCode::ExpiredAuthToken,
];
pub fn from_u64(v: u64) -> Option<Self> {
match v {
0x0 => Some(SubscribeNamespaceErrorCode::InternalError),
0x1 => Some(SubscribeNamespaceErrorCode::Unauthorized),
0x2 => Some(SubscribeNamespaceErrorCode::Timeout),
0x3 => Some(SubscribeNamespaceErrorCode::NotSupported),
0x4 => Some(SubscribeNamespaceErrorCode::NamespacePrefixUnknown),
0x5 => Some(SubscribeNamespaceErrorCode::NamespacePrefixOverlap),
0x10 => Some(SubscribeNamespaceErrorCode::MalformedAuthToken),
0x12 => Some(SubscribeNamespaceErrorCode::ExpiredAuthToken),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}
impl StreamResetErrorCode {
pub const ALL: &[StreamResetErrorCode] = &[
StreamResetErrorCode::InternalError,
StreamResetErrorCode::Cancelled,
StreamResetErrorCode::DeliveryTimeout,
StreamResetErrorCode::SessionClosed,
];
pub fn from_u64(v: u64) -> Option<Self> {
match v {
0x0 => Some(StreamResetErrorCode::InternalError),
0x1 => Some(StreamResetErrorCode::Cancelled),
0x2 => Some(StreamResetErrorCode::DeliveryTimeout),
0x3 => Some(StreamResetErrorCode::SessionClosed),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}