#[non_exhaustive]pub enum StreamEnd {
Disconnected,
Replaced,
Idle,
ServerClosed,
LoginDenied {
message: String,
},
ConnectFailed {
message: String,
},
ReconnectExhausted,
}Expand description
Why a stream stopped for good.
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.
Disconnected
The caller disconnected.
Replaced
Another session took over this login’s streamer slot (response code
12, CLOSE_CONNECTION); Schwab allows one per user.
Idle
Schwab stopped streaming to a session with no subscriptions
(response code 30, STOP_STREAMING).
ServerClosed
The server closed the socket normally without saying why.
LoginDenied
Schwab refused the login, even with a freshly refreshed token.
ConnectFailed
The first connection never got as far as a login.
ReconnectExhausted
The connection was lost and reconnecting is disabled or out of attempts.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StreamEnd
impl<'de> Deserialize<'de> for StreamEnd
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StreamEnd
Source§impl JsonSchema for StreamEnd
Available on crate feature schemars only.
impl JsonSchema for StreamEnd
Available on crate feature
schemars only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for StreamEnd
Auto Trait Implementations§
impl Freeze for StreamEnd
impl RefUnwindSafe for StreamEnd
impl Send for StreamEnd
impl Sync for StreamEnd
impl Unpin for StreamEnd
impl UnsafeUnpin for StreamEnd
impl UnwindSafe for StreamEnd
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