[][src]Trait turbulence::packet::PacketPool

pub trait PacketPool {
    type Packet: Packet;
    fn acquire(&self) -> Self::Packet;
}

Trait for packet allocation and pooling.

All packets that are allocated from turbulence are allocated through this interface.

Packets must implement the Packet trait and should all have the same capacity: the MTU for whatever the underlying transport is, up to MAX_PACKET_LEN in size.

Associated Types

Loading content...

Required methods

fn acquire(&self) -> Self::Packet

Loading content...

Implementors

impl<B: BufferPool> PacketPool for BufferPacketPool<B>[src]

type Packet = BufferPacket<B::Buffer>

impl<P> PacketPool for MuxPacketPool<P> where
    P: PacketPool
[src]

type Packet = MuxPacket<P::Packet>

Loading content...