pub struct CompositorRefCountableResource { /* private fields */ }Expand description
A server-side resource shared by reference counting.
Implementations§
Source§impl CompositorRefCountableResource
impl CompositorRefCountableResource
pub fn new(value: ServerObjectId) -> Self
pub fn value(&self) -> ServerObjectId
pub fn ref_count(&self) -> i32
pub fn add_ref(&mut self)
Sourcepub fn release(&mut self, c: &Compositor) -> bool
pub fn release(&mut self, c: &Compositor) -> bool
Drops one reference; when it was the last one the server object is
disposed with the next batch and true is returned.
Auto Trait Implementations§
impl Freeze for CompositorRefCountableResource
impl RefUnwindSafe for CompositorRefCountableResource
impl Send for CompositorRefCountableResource
impl Sync for CompositorRefCountableResource
impl Unpin for CompositorRefCountableResource
impl UnsafeUnpin for CompositorRefCountableResource
impl UnwindSafe for CompositorRefCountableResource
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more