pub struct PacketRegistry {
pub keys: HashMap<String, PacketWrapper>,
}Expand description
PacketRegistry. Contains data of the registered packets
Fields§
§keys: HashMap<String, PacketWrapper>The data of the packets
Implementations§
Source§impl PacketRegistry
Default PacketRegistry Implementation
impl PacketRegistry
Default PacketRegistry Implementation
Sourcepub fn register(&mut self, name: String, wrapper: PacketWrapper)
pub fn register(&mut self, name: String, wrapper: PacketWrapper)
Register a packet
pub fn get(&self, key: &str) -> &PacketWrapper
Auto Trait Implementations§
impl Freeze for PacketRegistry
impl !RefUnwindSafe for PacketRegistry
impl Send for PacketRegistry
impl Sync for PacketRegistry
impl Unpin for PacketRegistry
impl !UnwindSafe for PacketRegistry
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