pub struct FnMutControlledMessageHandler { /* private fields */ }Implementations§
Source§impl FnMutControlledMessageHandler
impl FnMutControlledMessageHandler
pub fn new() -> Self
Sourcepub fn set<T>(
&mut self,
ctx: &mut T,
func: fn(&mut T, &[u8], AeronHeader) -> aeron_controlled_fragment_handler_action_t,
) -> &mut Self
pub fn set<T>( &mut self, ctx: &mut T, func: fn(&mut T, &[u8], AeronHeader) -> aeron_controlled_fragment_handler_action_t, ) -> &mut Self
Point this handler at ctx / func so the next call
dispatches into them.
§Lifetime contract (caller must uphold)
Same as FnMutMessageHandler::set:
ctx is stored as a raw pointer that escapes the borrow. The caller MUST
keep ctx alive (and unmoved) until this handler is retired or re-set;
calling call after ctx is dropped is use-after-free.
pub fn call( &mut self, msg: &[u8], header: AeronHeader, ) -> aeron_controlled_fragment_handler_action_t
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Drop the borrowed ctx (cf. FnMutMessageHandler::clear) so a later stray
call returns CONTINUE instead of dereferencing a stale pointer.
Trait Implementations§
Source§impl AeronControlledFragmentHandlerCallback for FnMutControlledMessageHandler
impl AeronControlledFragmentHandlerCallback for FnMutControlledMessageHandler
fn handle_aeron_controlled_fragment_handler( &mut self, buffer: &[u8], header: AeronHeader, ) -> aeron_controlled_fragment_handler_action_t
Auto Trait Implementations§
impl Freeze for FnMutControlledMessageHandler
impl RefUnwindSafe for FnMutControlledMessageHandler
impl !Send for FnMutControlledMessageHandler
impl !Sync for FnMutControlledMessageHandler
impl Unpin for FnMutControlledMessageHandler
impl UnsafeUnpin for FnMutControlledMessageHandler
impl UnwindSafe for FnMutControlledMessageHandler
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