Struct rusteron_archive::Handler
source · pub struct Handler<T> { /* private fields */ }
Expand description
§Handler
Handler
is a struct that wraps a raw pointer and a drop flag.
Important: Handler
does not get dropped automatically.
You need to call the release
method if you want to clear the memory manually.
§Example
use rusteron_code_gen::Handler;
let handler = Handler::leak(your_value);
// When you are done with the handler
handler.release();
Implementations§
§impl<T: AeronFragmentHandlerCallback> Handler<T>
impl<T: AeronFragmentHandlerCallback> Handler<T>
pub fn leak_with_fragment_assembler( handler: T, ) -> Result<(Handler<AeronFragmentAssembler>, Handler<T>), AeronCError>
§impl<T: AeronControlledFragmentHandlerCallback> Handler<T>
impl<T: AeronControlledFragmentHandlerCallback> Handler<T>
pub fn leak_with_controlled_fragment_assembler( handler: T, ) -> Result<(Handler<AeronControlledFragmentAssembler>, Handler<T>), AeronCError>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Handler<T>
impl<T> RefUnwindSafe for Handler<T>where
T: RefUnwindSafe,
impl<T> !Send for Handler<T>
impl<T> !Sync for Handler<T>
impl<T> Unpin 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