pub struct ErasedBorrowedPtr { /* private fields */ }Implementations§
Source§impl ErasedBorrowedPtr
impl ErasedBorrowedPtr
Sourcepub const unsafe fn from_raw(ptr: *mut c_void) -> Self
pub const unsafe fn from_raw(ptr: *mut c_void) -> Self
§Safety
ptr must be either null or point to a valid value for the duration of
any pointer-based operations performed through this wrapper.
pub const fn null() -> Self
pub const fn as_raw(&self) -> *mut c_void
pub fn is_null(&self) -> bool
pub fn with_ptr<R: Any, F>(&self, op: F) -> Result<R>
pub fn with_ptr_ok<R: Any, F>(&self, op: F) -> Result<R>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErasedBorrowedPtr
impl RefUnwindSafe for ErasedBorrowedPtr
impl !Send for ErasedBorrowedPtr
impl !Sync for ErasedBorrowedPtr
impl Unpin for ErasedBorrowedPtr
impl UnsafeUnpin for ErasedBorrowedPtr
impl UnwindSafe for ErasedBorrowedPtr
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