pub struct RegistryBox<'c> { /* private fields */ }Expand description
Smart pointer providing unique ownership of a PipeWire registry.
For shared ownership, see RegistryRc.
For an explanation of these, see Smart pointers to PipeWire objects.
Implementations§
Source§impl<'c> RegistryBox<'c>
impl<'c> RegistryBox<'c>
Sourcepub unsafe fn from_raw(ptr: NonNull<pw_registry>) -> Self
pub unsafe fn from_raw(ptr: NonNull<pw_registry>) -> Self
Create a RegistryBox 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 RegistryBox takes
ownership of it.
The lifetime of the returned box is unbounded. The caller is responsible to make sure that the core used with this registry outlives the registry.
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.