pub struct PacketObject { /* private fields */ }Implementations§
Source§impl PacketObject
impl PacketObject
pub fn id(&self) -> ObjID
pub fn object(&self) -> &Object<PacketBufferBase>
pub fn new( spec: ObjectCreate, nr_packets: usize, packet_size: usize, ) -> Result<Self, TwzError>
pub fn packet_size(&self) -> usize
pub fn packet_offset(&self, id: u32) -> usize
pub fn packet_mem(&self, id: u32) -> &[u8] ⓘ
pub fn packet_mem_mut(&self, id: u32) -> &mut [u8] ⓘ
pub fn allocate_packet(&self) -> Option<u32>
pub fn release_packet(&self, id: u32)
Trait Implementations§
Source§impl Clone for PacketObject
impl Clone for PacketObject
Source§fn clone(&self) -> PacketObject
fn clone(&self) -> PacketObject
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<Object<PacketBufferBase>> for PacketObject
impl From<Object<PacketBufferBase>> for PacketObject
Source§fn from(obj: Object<PacketBufferBase>) -> Self
fn from(obj: Object<PacketBufferBase>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PacketObject
impl !RefUnwindSafe for PacketObject
impl Send for PacketObject
impl StoreCopy for PacketObject
impl Sync for PacketObject
impl Unpin for PacketObject
impl !UnwindSafe for PacketObject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more