pub struct Context { /* private fields */ }Expand description
Represents a top-level context for a client. This includes configuration (provided as properties, and loaded from standard client configuration), and the main event loop.
Implementations§
Source§impl Context
impl Context
Sourcepub fn new(main_loop: &MainLoop, properties: Properties) -> Result<Self>
pub fn new(main_loop: &MainLoop, properties: Properties) -> Result<Self>
Creates a new context using the given main loop and properties. Communication with the PipeWire server in subsequent API calls will happen on the given main loop.
Sourcepub fn properties(&self) -> Properties
pub fn properties(&self) -> Properties
Retrieves the Properties associated with this context.
Trait Implementations§
Source§impl Refcounted for Context
impl Refcounted for Context
Source§type WeakRef = WeakContext
type WeakRef = WeakContext
The type of a weak reference to the object
Source§fn upgrade(this: &Self::WeakRef) -> Option<Self>
fn upgrade(this: &Self::WeakRef) -> Option<Self>
Try to convert a weak reference to a strong reference. If the underlying object isstill
alive, returns a
Some continaing the value. If the underlying object’s strong reference
count dropped to zero, and was thus freed, this returns None.Source§fn downgrade(&self) -> Self::WeakRef
fn downgrade(&self) -> Self::WeakRef
Create a weak reference to the object. This reference does not impact the object’s
lifecycle, and merely allows us the option to try to retrieve the object using
Self::upgrade().
impl Send for Context
impl Sync for Context
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Unpin for Context
impl !UnwindSafe for Context
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