[][src]Struct packet_crafter::Packet

pub struct Packet { /* fields omitted */ }

Methods

impl Packet[src]

impl Packet[src]

pub fn set_payload(&mut self, v: Vec<u8>)[src]

impl Packet[src]

pub fn new(protos: Vec<Protocol>) -> Self[src]

pub fn new_empty() -> Self[src]

pub fn add_header(&mut self, buf: impl Header)[src]

pub fn extend_payload<T: IntoIterator<Item = u8>>(&mut self, buf: T)[src]

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

pub fn parse(raw_data: &[u8]) -> Result<Self, ParseError>[src]

pub fn get_header_as_slice(&self, p: Protocol) -> Option<&[u8]>[src]

Returns Some(&u8) if the header is found in this packet, else None

impl Packet[src]

Auto Trait Implementations

impl RefUnwindSafe for Packet

impl Send for Packet

impl Sync for Packet

impl Unpin for Packet

impl UnwindSafe for Packet

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.