pub struct RefCounterIsOwned<const OWNED: bool>(/* private fields */);
Expand description
This class is used to manage reference-counting providing a simple interface and a counter.
RefCounter
represents a C++wxRefCounter
class instance which your code has ownership,RefCounterIsOwned
<false>
represents one which don’t own.- Use
RefCounter
’snew()
to create an instance of this class. - See C++
wxRefCounter
class’s documentation for more details.
Implementations§
Source§impl<const OWNED: bool> RefCounterIsOwned<OWNED>
impl<const OWNED: bool> RefCounterIsOwned<OWNED>
Trait Implementations§
Source§impl Clone for RefCounterIsOwned<false>
impl Clone for RefCounterIsOwned<false>
Source§impl<const OWNED: bool> Drop for RefCounterIsOwned<OWNED>
impl<const OWNED: bool> Drop for RefCounterIsOwned<OWNED>
Source§impl<const OWNED: bool> RefCounterMethods for RefCounterIsOwned<OWNED>
impl<const OWNED: bool> RefCounterMethods for RefCounterIsOwned<OWNED>
Source§impl<const OWNED: bool> WxRustMethods for RefCounterIsOwned<OWNED>
impl<const OWNED: bool> WxRustMethods for RefCounterIsOwned<OWNED>
type Unowned = RefCounterIsOwned<false>
unsafe fn as_ptr(&self) -> *mut c_void
unsafe fn from_ptr(ptr: *mut c_void) -> Self
unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned
unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F)
unsafe fn option_from(ptr: *mut c_void) -> Option<Self::Unowned>where
Self: Sized,
Auto Trait Implementations§
impl<const OWNED: bool> Freeze for RefCounterIsOwned<OWNED>
impl<const OWNED: bool> RefUnwindSafe for RefCounterIsOwned<OWNED>
impl<const OWNED: bool> !Send for RefCounterIsOwned<OWNED>
impl<const OWNED: bool> !Sync for RefCounterIsOwned<OWNED>
impl<const OWNED: bool> Unpin for RefCounterIsOwned<OWNED>
impl<const OWNED: bool> UnwindSafe for RefCounterIsOwned<OWNED>
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