[−][src]Struct tsproto::packets::OutPacket
Methods
impl OutPacket
[src]
pub fn new(
mac: [u8; 8],
packet_id: u16,
client_id: Option<u16>,
flags: Flags,
packet_type: PacketType
) -> Self
[src]
mac: [u8; 8],
packet_id: u16,
client_id: Option<u16>,
flags: Flags,
packet_type: PacketType
) -> Self
pub fn new_with_dir(
dir: Direction,
flags: Flags,
packet_type: PacketType
) -> Self
[src]
dir: Direction,
flags: Flags,
packet_type: PacketType
) -> Self
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]
fn clone(&self) -> 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]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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]
T: Send + Sync + UnwindSafe + ?Sized,