pub enum MediaResponse {
    Status(Status),
    LoadCancelled(LoadCancelled),
    LoadFailed(LoadFailed),
    InvalidPlayerState(InvalidPlayerState),
    InvalidRequest(InvalidRequest),
    NotImplemented(StringValue),
}
Expand description

Represents all currently supported incoming messages that media channel can handle.

Variants§

§

Status(Status)

Statuses of the currently active media.

§

LoadCancelled(LoadCancelled)

Sent when the load request was cancelled (a second load request was received).

§

LoadFailed(LoadFailed)

Sent when the load request failed. The player state will be IDLE.

§

InvalidPlayerState(InvalidPlayerState)

Sent when the request by the sender can not be fulfilled because the player is not in a valid state. For example, if the application has not created a media element yet.

§

InvalidRequest(InvalidRequest)

Error indicating that request is not valid.

§

NotImplemented(StringValue)

Used every time when channel can’t parse the message. Associated data contains type string field and raw JSON data returned from cast device.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.