pub struct MainLoopBox { /* private fields */ }
Implementations§
Source§impl MainLoopBox
impl MainLoopBox
Sourcepub fn new(properties: Option<&DictRef>) -> Result<Self, Error>
pub fn new(properties: Option<&DictRef>) -> Result<Self, Error>
Initialize Pipewire and create a new MainLoopBox
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 MainLoopBox
takes ownership of it.
pub fn into_raw(self) -> NonNull<pw_main_loop>
Methods from Deref<Target = MainLoop>§
pub fn as_raw(&self) -> &pw_main_loop
pub fn as_raw_ptr(&self) -> *mut pw_main_loop
pub fn loop_(&self) -> &Loop
pub fn run(&self)
pub fn quit(&self)
Trait Implementations§
Source§impl AsRef<MainLoop> for MainLoopBox
impl AsRef<MainLoop> for MainLoopBox
Source§impl Debug for MainLoopBox
impl Debug for MainLoopBox
Source§impl Deref for MainLoopBox
impl Deref for MainLoopBox
Auto Trait Implementations§
impl Freeze for MainLoopBox
impl RefUnwindSafe for MainLoopBox
impl !Send for MainLoopBox
impl !Sync for MainLoopBox
impl Unpin for MainLoopBox
impl UnwindSafe for MainLoopBox
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