[][src]Struct tsproto::packets::OutPacket

pub struct OutPacket { /* fields omitted */ }

Methods

impl OutPacket[src]

pub fn new(
    mac: [u8; 8],
    packet_id: u16,
    client_id: Option<u16>,
    flags: Flags,
    packet_type: PacketType
) -> Self
[src]

pub fn new_with_dir(
    dir: Direction,
    flags: Flags,
    packet_type: PacketType
) -> Self
[src]

Fill packet with known data. The rest gets filled by packet_codec.

pub fn new_from_data(dir: Direction, data: Vec<u8>) -> Self[src]

pub fn into_vec(self) -> Vec<u8>[src]

pub fn data_mut(&mut self) -> &mut Vec<u8>[src]

pub fn content(&self) -> &[u8][src]

pub fn content_mut(&mut self) -> &mut [u8][src]

pub fn direction(&self) -> Direction[src]

pub fn header(&self) -> InHeader[src]

pub fn header_bytes(&self) -> &[u8][src]

pub fn mac(&mut self) -> &mut [u8; 8][src]

pub fn packet_id(&mut self, packet_id: u16)[src]

pub fn client_id(&mut self, client_id: u16)[src]

pub fn flags(&mut self, flags: Flags)[src]

pub fn packet_type(&mut self, packet_type: PacketType)[src]

Trait Implementations

impl Eq for OutPacket[src]

impl PartialEq<OutPacket> for OutPacket[src]

impl Clone for OutPacket[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for OutPacket[src]

impl Hash for OutPacket[src]

default fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for OutPacket

impl Sync for OutPacket

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?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

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]