pub struct ObsHotkeyRegistration { /* private fields */ }Expand description
One registered libobs hotkey. Dropping it unregisters the native hotkey on the OBS actor.
Implementations§
Source§impl ObsHotkeyRegistration
impl ObsHotkeyRegistration
pub fn id(&self) -> usize
Sourcepub fn events(&self) -> SignalReceiver<HotkeyEvent>
pub fn events(&self) -> SignalReceiver<HotkeyEvent>
Subscribes to bounded press/release events. Slow subscribers drop new events rather than blocking libobs’s hotkey callback.
Sourcepub fn save_bindings(&self) -> Result<HotkeyBindingSnapshot, ObsError>
pub fn save_bindings(&self) -> Result<HotkeyBindingSnapshot, ObsError>
Saves the native binding array as owned JSON objects suitable for later load_bindings.
Sourcepub fn load_bindings(
&self,
snapshot: &HotkeyBindingSnapshot,
) -> Result<(), ObsError>
pub fn load_bindings( &self, snapshot: &HotkeyBindingSnapshot, ) -> Result<(), ObsError>
Replaces the native bindings for this registration from a prior snapshot.
Trait Implementations§
Source§impl Debug for ObsHotkeyRegistration
impl Debug for ObsHotkeyRegistration
Source§impl Drop for ObsHotkeyRegistration
impl Drop for ObsHotkeyRegistration
Auto Trait Implementations§
impl !RefUnwindSafe for ObsHotkeyRegistration
impl !UnwindSafe for ObsHotkeyRegistration
impl Forget for ObsHotkeyRegistration
impl Freeze for ObsHotkeyRegistration
impl Move for ObsHotkeyRegistration
impl Send for ObsHotkeyRegistration
impl Sync for ObsHotkeyRegistration
impl Unpin for ObsHotkeyRegistration
impl UnsafeUnpin for ObsHotkeyRegistration
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