Struct gnunet_sys::GNUNET_MQ_MessageHandler [−][src]
Message handler for a specific message type.
Fields
mv: GNUNET_MQ_MessageValidationCallback
Callback to validate a message of the specified @e type. The closure given to @e mv will be this struct (not @e ctx). Using NULL means only size-validation using @e expected_size. In this case, @e expected_size must be non-zero.
cb: GNUNET_MQ_MessageCallback
Callback, called every time a new message of the specified @e type has been received. The closure given to @e mv will be this struct (not @e ctx).
cls: *mut c_void
Closure for @e mv and @e cb.
type_: u16
Type of the message this handler covers, in host byte order.
expected_size: u16
Expected size of messages of this type. Minimum size of the message if @e mv is non-NULL. Messages of the given type will be discarded (and the connection closed with an error reported to the application) if they do not have the right size.
Trait Implementations
impl Clone for GNUNET_MQ_MessageHandler
[src]
fn clone(&self) -> GNUNET_MQ_MessageHandler
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for GNUNET_MQ_MessageHandler
[src]
impl Debug for GNUNET_MQ_MessageHandler
[src]
Auto Trait Implementations
impl RefUnwindSafe for GNUNET_MQ_MessageHandler
impl !Send for GNUNET_MQ_MessageHandler
impl !Sync for GNUNET_MQ_MessageHandler
impl Unpin for GNUNET_MQ_MessageHandler
impl UnwindSafe for GNUNET_MQ_MessageHandler
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,