Struct rusteron_rb::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§
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