pub struct Registry(/* private fields */);Expand description
Transparent wrapper around a registry.
This does not own the underlying object and is usually seen behind a & reference.
For owning wrappers, see RegistryBox and RegistryRc.
For an explanation of these, see Smart pointers to PipeWire objects.
Implementations§
Source§impl Registry
impl 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<'c> AsRef<Registry> for RegistryBox<'c>
impl<'c> AsRef<Registry> for RegistryBox<'c>
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnwindSafe for Registry
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