pub enum NetConnectionCommand<'a> {
Connect(NetConnectionCommandConnect<'a>),
ConnectResult(NetConnectionCommandConnectResult<'a>),
Call {
command_object: Option<Amf0Object<'a>>,
optional_arguments: Option<Amf0Object<'a>>,
},
Close,
CreateStream,
CreateStreamResult {
stream_id: f64,
},
}
Expand description
NetConnection commands as defined in 7.2.1.
Variants§
Connect(NetConnectionCommandConnect<'a>)
Connect command.
ConnectResult(NetConnectionCommandConnectResult<'a>)
Connect result.
Sent from server to client in response to NetConnectionCommand::Connect
.
Call
Call command.
Fields
Close
Close command.
CreateStream
Create stream command.
CreateStreamResult
Create stream result.
Sent from server to client in response to NetConnectionCommand::CreateStream
.
Implementations§
Source§impl NetConnectionCommand<'_>
impl NetConnectionCommand<'_>
Sourcepub fn read(
command_name: &str,
decoder: &mut Amf0Decoder<BytesBuf<Bytes>>,
) -> Result<Option<Self>, CommandError>
pub fn read( command_name: &str, decoder: &mut Amf0Decoder<BytesBuf<Bytes>>, ) -> Result<Option<Self>, CommandError>
Reads a NetConnectionCommand
from the given decoder.
Returns Ok(None)
if the command_name
is not recognized.
Source§impl NetConnectionCommand<'_>
impl NetConnectionCommand<'_>
Sourcepub fn write(
self,
buf: &mut impl Write,
transaction_id: f64,
) -> Result<(), CommandError>
pub fn write( self, buf: &mut impl Write, transaction_id: f64, ) -> Result<(), CommandError>
Writes a NetConnectionCommand
to the given writer.
Trait Implementations§
Source§impl<'a> Clone for NetConnectionCommand<'a>
impl<'a> Clone for NetConnectionCommand<'a>
Source§fn clone(&self) -> NetConnectionCommand<'a>
fn clone(&self) -> NetConnectionCommand<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for NetConnectionCommand<'a>
impl<'a> Debug for NetConnectionCommand<'a>
Source§impl<'a> PartialEq for NetConnectionCommand<'a>
impl<'a> PartialEq for NetConnectionCommand<'a>
impl<'a> StructuralPartialEq for NetConnectionCommand<'a>
Auto Trait Implementations§
impl<'a> !Freeze for NetConnectionCommand<'a>
impl<'a> RefUnwindSafe for NetConnectionCommand<'a>
impl<'a> Send for NetConnectionCommand<'a>
impl<'a> Sync for NetConnectionCommand<'a>
impl<'a> Unpin for NetConnectionCommand<'a>
impl<'a> UnwindSafe for NetConnectionCommand<'a>
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