Enum MessageData

Source
pub enum MessageData<'a> {
Show 16 variants SetChunkSize(ProtocolControlMessageSetChunkSize), Abort, Acknowledgement, UserControlEvent, SetAcknowledgementWindowSize(ProtocolControlMessageWindowAcknowledgementSize), SetPeerBandwidth, AudioData { data: Bytes, }, VideoData { data: Bytes, }, DataAmf3, SharedObjAmf3, CommandAmf3, DataAmf0 { data: Bytes, }, SharedObjAmf0, Amf0Command(Command<'a>), Aggregate, Unknown(UnknownMessage),
}
Expand description

Different types of messages that can be sent or received.

Defined by:

  • Legacy RTMP spec, 5.4

Variants§

§

SetChunkSize(ProtocolControlMessageSetChunkSize)

Set Chunk Size message

§

Abort

Abort message

Not implemented.

§

Acknowledgement

Acknowledgement message

Read not implemented.

§

UserControlEvent

User Control Event message

Not implemented.

§

SetAcknowledgementWindowSize(ProtocolControlMessageWindowAcknowledgementSize)

Set Acknowledgement Window Size message

§

SetPeerBandwidth

Set Peer Bandwidth message

Read not implemented.

§

AudioData

Audio message

The client or the server sends this message to send audio data to the peer.

Usually contains FLV AUDIODATA.

Fields

§data: Bytes

The audio data.

§

VideoData

Video message

The client or the server sends this message to send video data to the peer.

Usually contains FLV VIDEODATA.

Fields

§data: Bytes

The video data.

§

DataAmf3

Amf3 metadata message

Not implemented.

§

SharedObjAmf3

Amf3 shared object message

Not implemented.

§

CommandAmf3

Amf3 command message

Not implemented.

§

DataAmf0

Amf0 metadata message

The client or the server sends this message to send Metadata or any user data to the peer. Metadata includes details about the data(audio, video etc.) like creation time, duration, theme and so on.

Fields

§data: Bytes

The metadata.

§

SharedObjAmf0

Amf0 shared object message

Not implemented.

§

Amf0Command(Command<'a>)

Amf0 command message

Command messages carry the AMF-encoded commands between the client and the server.

§

Aggregate

Aggregate message

Not implemented.

§

Unknown(UnknownMessage)

Any other undefined messages.

Implementations§

Source§

impl MessageData<'_>

Source

pub fn read(chunk: &Chunk) -> Result<Self, RtmpError>

Reads MessageData from the given chunk.

Trait Implementations§

Source§

impl<'a> Debug for MessageData<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for MessageData<'a>

§

impl<'a> RefUnwindSafe for MessageData<'a>

§

impl<'a> Send for MessageData<'a>

§

impl<'a> Sync for MessageData<'a>

§

impl<'a> Unpin for MessageData<'a>

§

impl<'a> UnwindSafe for MessageData<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more