pub enum OutgoingPacket {
Encrypted {
opcode: u16,
data: Bytes,
},
Simple {
opcode: u16,
data: Bytes,
},
Massive {
opcode: u16,
packets: Vec<Bytes>,
},
}Expand description
A packet on its way out, before having been turned into a frame.
In turn, we still need to know what kind of frame it should end up as. Generally, one outgoing packet will result in a single frame, but multiple packets can be combined to a massive packet. This will span multiple frames, including an additional header.
Variants§
Encrypted
A packet that shall be encrypted before being sent out.
Simple
A basic packet that doesn’t need any additional transformation.
Massive
A massive packet containing multiple inner packets that should be sent together.
Trait Implementations§
Source§impl AsFrames for OutgoingPacket
impl AsFrames for OutgoingPacket
Source§fn as_frames(
&self,
context: SecurityContext<'_>,
) -> Result<Vec<SilkroadFrame>, FramingError>
fn as_frames( &self, context: SecurityContext<'_>, ) -> Result<Vec<SilkroadFrame>, FramingError>
Creates a collection of SilkroadFrame that represent
the given structure. Read more
Source§impl Debug for OutgoingPacket
impl Debug for OutgoingPacket
Source§impl<T: AsPacket> From<T> for OutgoingPacket
impl<T: AsPacket> From<T> for OutgoingPacket
Source§impl PartialEq for OutgoingPacket
impl PartialEq for OutgoingPacket
impl Eq for OutgoingPacket
impl StructuralPartialEq for OutgoingPacket
Auto Trait Implementations§
impl !Freeze for OutgoingPacket
impl RefUnwindSafe for OutgoingPacket
impl Send for OutgoingPacket
impl Sync for OutgoingPacket
impl Unpin for OutgoingPacket
impl UnwindSafe for OutgoingPacket
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