pub struct Handler<T> { /* private fields */ }Expand description
§Handler
Handler is a struct that wraps a raw pointer and a drop flag.
Memory is freed automatically when Handler goes out of scope (via Drop).
You must ensure the Handler outlives the Aeron session that uses it, since Aeron
holds a raw clientd pointer to the boxed value and will call callbacks until closed.
Call release() early if you want to free the memory before the Handler drops.
§Example
use rusteron_code_gen::Handler;
let handler = Handler::leak(your_value);
// handler is freed automatically when it goes out of scopeImplementations§
Trait Implementations§
impl<T> Send for Handler<T>
impl<T> Sync for Handler<T>
Auto Trait Implementations§
impl<T> Freeze for Handler<T>
impl<T> RefUnwindSafe for Handler<T>where
T: RefUnwindSafe,
impl<T> Unpin for Handler<T>
impl<T> UnsafeUnpin for Handler<T>
impl<T> UnwindSafe for Handler<T>where
T: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more