pub struct MainLoop { /* private fields */ }
Implementations§
source§impl MainLoop
impl MainLoop
sourcepub fn new(properties: Option<&DictRef>) -> Result<Self, Error>
pub fn new(properties: Option<&DictRef>) -> Result<Self, Error>
Initialize Pipewire and create a new MainLoop
sourcepub unsafe fn from_raw(ptr: NonNull<pw_main_loop>) -> Self
pub unsafe fn from_raw(ptr: NonNull<pw_main_loop>) -> Self
Create a new main loop from a raw pw_main_loop
, taking ownership of it.
§Safety
The provided pointer must point to a valid, well aligned pw_main_loop
.
The raw loop should not be manually destroyed or moved, as the new MainLoop
takes ownership of it.
pub fn as_raw_ptr(&self) -> *mut pw_main_loop
pub fn downgrade(&self) -> WeakMainLoop
pub fn loop_(&self) -> &LoopRef
pub fn run(&self)
pub fn quit(&self)
Trait Implementations§
impl IsLoopRc for MainLoop
Auto Trait Implementations§
impl RefUnwindSafe for MainLoop
impl !Send for MainLoop
impl !Sync for MainLoop
impl Unpin for MainLoop
impl UnwindSafe for MainLoop
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