pub struct RegistryRc { /* private fields */ }Expand description
Reference counting smart pointer providing shared ownership of a PipeWire registry.
For the non-owning variant, see RegistryWeak.
For unique ownership, see RegistryBox.
For an explanation of these, see Smart pointers to PipeWire objects.
Implementations§
Source§impl RegistryRc
impl RegistryRc
Sourcepub unsafe fn from_raw(ptr: NonNull<pw_registry>, core: CoreRc) -> Self
pub unsafe fn from_raw(ptr: NonNull<pw_registry>, core: CoreRc) -> Self
Create a RegistryRc by taking ownership of a raw pw_registry.
§Safety
The provided pointer must point to a valid, well aligned pw_registry.
The raw registry must not be manually destroyed or moved, as the new RegistryRc takes
ownership of it.
pub fn downgrade(&self) -> RegistryWeak
Methods from Deref<Target = Registry>§
pub fn as_raw(&self) -> &pw_registry
pub fn as_raw_ptr(&self) -> *mut pw_registry
pub fn add_listener_local(&self) -> ListenerLocalBuilder<'_>
Sourcepub fn bind<T: ProxyT, P: AsRef<DictRef>>(
&self,
object: &GlobalObject<P>,
) -> Result<T, Error>
pub fn bind<T: ProxyT, P: AsRef<DictRef>>( &self, object: &GlobalObject<P>, ) -> Result<T, Error>
Bind to a global object.
Bind to the global object and get a proxy to the object. After this call, methods can be sent to the remote global object and events can be received.
Usually this is called in callbacks for the global event.
§Errors
If T does not match the type of the global object, Error::WrongProxyType is returned.
Trait Implementations§
Source§impl AsRef<Registry> for RegistryRc
impl AsRef<Registry> for RegistryRc
Source§impl Clone for RegistryRc
impl Clone for RegistryRc
Source§fn clone(&self) -> RegistryRc
fn clone(&self) -> RegistryRc
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more