#[repr(C)]pub struct Managed {
pub pointer: *mut (),
pub drop: extern "C" fn(*mut ()),
}Fields§
§pointer: *mut ()§drop: extern "C" fn(*mut ())Implementations§
Source§impl Managed
impl Managed
pub fn from_value<T>(value: T) -> Self
pub fn from_box<T>(b: Box<T>) -> Self
pub fn from_static<T>(static_ref: &'static T) -> Self
pub fn as_mut_ptr(&self) -> *mut ()
pub fn as_ptr(&self) -> *const ()
Sourcepub unsafe fn into_value<T>(self) -> T
pub unsafe fn into_value<T>(self) -> T
Consume this managed value, turning it into the type
Safety: This is unsafe because we don’t know the type behind the raw pointer
Trait Implementations§
Source§impl From<ManagedCloneable> for Managed
impl From<ManagedCloneable> for Managed
Source§fn from(ma: ManagedCloneable) -> Self
fn from(ma: ManagedCloneable) -> Self
Converts to this type from the input type.
impl Send for Managed
impl Sync for Managed
Auto Trait Implementations§
impl Freeze for Managed
impl RefUnwindSafe for Managed
impl Unpin for Managed
impl UnwindSafe for Managed
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