#[repr(C)]pub struct pt_config__bindgen_ty_1 {
pub callback: Option<unsafe extern "C" fn(unknown: *mut pt_packet_unknown, config: *const pt_config, pos: *const u8, context: *mut c_void) -> c_int>,
pub context: *mut c_void,
}Expand description
An optional callback for handling unknown packets.
If @callback is not NULL, it is called for any unknown opcode.
Fields§
§callback: Option<unsafe extern "C" fn(unknown: *mut pt_packet_unknown, config: *const pt_config, pos: *const u8, context: *mut c_void) -> c_int>The callback function.
It shall decode the packet at @pos into @unknown. It shall return the number of bytes read upon success. It shall return a negative pt_error_code otherwise. The below context is passed as @context.
context: *mut c_voidThe user-defined context for this configuration.
Trait Implementations§
Source§impl Clone for pt_config__bindgen_ty_1
impl Clone for pt_config__bindgen_ty_1
Source§fn clone(&self) -> pt_config__bindgen_ty_1
fn clone(&self) -> pt_config__bindgen_ty_1
Returns a copy 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 Debug for pt_config__bindgen_ty_1
impl Debug for pt_config__bindgen_ty_1
Source§impl Hash for pt_config__bindgen_ty_1
impl Hash for pt_config__bindgen_ty_1
Source§impl PartialEq for pt_config__bindgen_ty_1
impl PartialEq for pt_config__bindgen_ty_1
impl Copy for pt_config__bindgen_ty_1
impl Eq for pt_config__bindgen_ty_1
impl StructuralPartialEq for pt_config__bindgen_ty_1
Auto Trait Implementations§
impl Freeze for pt_config__bindgen_ty_1
impl RefUnwindSafe for pt_config__bindgen_ty_1
impl !Send for pt_config__bindgen_ty_1
impl !Sync for pt_config__bindgen_ty_1
impl Unpin for pt_config__bindgen_ty_1
impl UnwindSafe for pt_config__bindgen_ty_1
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