pub fn for_packet(&self, ty: PacketType) -> Vec<QueuedPacket> {
        let ordinal = ty.ordinal();

        let mut queued_packets = self.queue[ordinal].lock();

        let mut new_queue = vec![];
        std::mem::swap(&mut new_queue, &mut queued_packets);

        new_queue
    }
/// Returns the packets queued for handling
/// of the given type, draining the queue of this
/// type of packet.
Returns the packets queued for handling
of the given type, draining the queue of this
type of packet.
Returns the packets queued for handling of the given type draining the queue of this type of packet .
pub fn for_packet(&self, ty: PacketType) -> Vec<QueuedPacket> {
        let ordinal = ty.ordinal();
        let mut queued_packets = self.queue[ordinal].lock();
        let mut new_queue = vec![];
        std::mem::swap(&mut new_queue, &mut queued_packets);
        new_queue
    }
pub fn for_packet ( & self , ty : PacketType ) -> Vec < QueuedPacket > { let ordinal = ty . ordinal ( ) ; let mut queued_packets = self . queue [ ordinal ] . lock ( ) ; let mut new_queue = vec ! [ ] ; std :: mem :: swap ( & mut new_queue , & mut queued_packets ) ; new_queue }
Returns the packets queued for handling
of the given type, draining the queue of this
type of packet.
Returns the packets queued for handling of the given type draining the queue of this type of packet .
&self
ty
PacketType
&self
ty
PacketType