[][src]Enum rml_rtmp::sessions::ClientSessionErrorKind

pub enum ClientSessionErrorKind {
    ChunkDeserializationError(ChunkDeserializationError),
    ChunkSerializationError(ChunkSerializationError),
    MessageSerializationError(MessageSerializationError),
    MessageDeserializationError(MessageDeserializationError),
    CantConnectWhileAlreadyConnected,
    SessionInInvalidState {
        current_state: ClientState,
    },
    NoKnownActiveStreamIdWhenRequired,
    CreateStreamFailed,
    CreateStreamResponseHadNoStreamNumber,
    InvalidOnStatusArguments,
}

Represents the type of error that occurred

Variants

ChunkDeserializationError(ChunkDeserializationError)

Encountered when an error occurs while deserializing the incoming byte data

ChunkSerializationError(ChunkSerializationError)

Encountered when an error occurs while serializing outbound messages

MessageSerializationError(MessageSerializationError)

Encountered when an error occurs while turning an RTMP message into an message payload

MessageDeserializationError(MessageDeserializationError)

Encountered when an error occurs while turning a message payload into an RTMP message

CantConnectWhileAlreadyConnected

Encountered if a connection request is made while we are already connected

SessionInInvalidState

Encountered if a request is made, or a response is received for a request while the client session is not in a valid state for that purpose.

Fields of SessionInInvalidState

current_state: ClientState
NoKnownActiveStreamIdWhenRequired

Encountered when attempting to send a message that requires having an active stream opened but none is marked down. This is almost always a bug with the ClientSession as this means we are in a valid state (e.g. Playing or Publishing) yet we never recorded what stream id we are publishing/playing on.

CreateStreamFailed

Encountered when the client requests a stream be created and the server rejects the command

CreateStreamResponseHadNoStreamNumber

A response to a createStream request should have a numeric as the first parameter in the additional values property of the amf0 command. This error is thrown if this is not present. Without a stream ID we have no way to know what stream to communicate with for playback/publishing messages.

InvalidOnStatusArguments

When the server sends and onStatus message, it is expected that the additional arguments contains a single value representing an amf0 object. This is required because the object should have a code property that says the type of operation the status is for.

Trait Implementations

impl Debug for ClientSessionErrorKind
[src]

impl Display for ClientSessionErrorKind
[src]

impl Fail for ClientSessionErrorKind
[src]

fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 
[src]

Provides context for this failure. Read more

fn compat(self) -> Compat<Self>
[src]

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsFail for T where
    T: Fail
[src]

impl<E> Fail for E where
    E: 'static + Error + Send + Sync
[src]

fn name(&self) -> Option<&str>
[src]

Returns the "name" of the error. Read more

fn cause(&self) -> Option<&(dyn Fail + 'static)>
[src]

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

fn backtrace(&self) -> Option<&Backtrace>
[src]

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 
[src]

Provides context for this failure. Read more

fn compat(self) -> Compat<Self>
[src]

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

impl<T> Same for T

type Output = T

Should always be Self