pub struct PacketEvent { /* private fields */ }Implementations§
Source§impl PacketEvent
impl PacketEvent
pub fn hook(filter: PacketFilter, hook: PacketHookFn) -> Self
pub fn hook_to_clientbound<F>( protocol_version: Option<u32>, packet_id: Option<i32>, hook: F, ) -> Self
Sourcepub fn hook_to_serverbound<F>(
protocol_version: Option<u32>,
packet_id: Option<i32>,
hook: F,
) -> Self
pub fn hook_to_serverbound<F>( protocol_version: Option<u32>, packet_id: Option<i32>, hook: F, ) -> Self
Hook to a specific serverbound packet
pub fn matches(&self, packet: &PacketData) -> bool
pub fn execute(&self, packet: &PacketData) -> Result<PacketHookResult>
pub fn filter(&self) -> &PacketFilter
Auto Trait Implementations§
impl !RefUnwindSafe for PacketEvent
impl !UnwindSafe for PacketEvent
impl Freeze for PacketEvent
impl Send for PacketEvent
impl Sync for PacketEvent
impl Unpin for PacketEvent
impl UnsafeUnpin for PacketEvent
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