Skip to main content

DisconnectCode

Enum DisconnectCode 

Source
pub enum DisconnectCode {
    Shutdown = 1,
    DuplicateStream = 2,
    ControlRequest = 3,
    Stall = 4,
    Normal = 5,
    TokenRevoked = 6,
    AdminLogout = 7,
    MaxMessageLimit = 9,
    StreamException = 10,
    BrokerStall = 11,
    ShedLoad = 12,
}
Expand description

Status code for a Disconnect message.

Variants§

§

Shutdown = 1

The feed was shutdown (possibly a machine restart).

§

DuplicateStream = 2

The same endpoint was connected too many times.

§

ControlRequest = 3

Control streams was used to close a stream (applies to sitestreams).

§

Stall = 4

The client was reading too slowly and was disconnected by the server.

§

Normal = 5

The client appeared to have initiated a disconnect.

§

TokenRevoked = 6

An oauth token was revoked for a user (applies to site and userstreams).

§

AdminLogout = 7

The same credentials were used to connect a new stream and the oldest was disconnected.

§

MaxMessageLimit = 9

The stream connected with a negative count parameter and was disconnected after all backfill was delivered.

§

StreamException = 10

An internal issue disconnected the stream.

§

BrokerStall = 11

An internal issue disconnected the stream.

§

ShedLoad = 12

The host the stream was connected to became overloaded and streams were disconnected to balance load. Reconnect as usual.

Trait Implementations§

Source§

impl AsRef<str> for DisconnectCode

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for DisconnectCode

Source§

fn clone(&self) -> DisconnectCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DisconnectCode

Source§

impl Debug for DisconnectCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'x> Deserialize<'x> for DisconnectCode

Source§

fn deserialize<D: Deserializer<'x>>(d: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for DisconnectCode

Source§

impl Hash for DisconnectCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DisconnectCode

Source§

fn eq(&self, other: &DisconnectCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DisconnectCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.