pub struct ProfileManager { /* private fields */ }Expand description
Manages keybind profiles
Implementations§
Source§impl ProfileManager
impl ProfileManager
Sourcepub fn create_profile(
&mut self,
name: impl Into<String>,
keybinds: Vec<Keybind>,
) -> Result<(), ProfileError>
pub fn create_profile( &mut self, name: impl Into<String>, keybinds: Vec<Keybind>, ) -> Result<(), ProfileError>
Create a new profile
Sourcepub fn select_profile(&mut self, name: &str) -> Result<(), ProfileError>
pub fn select_profile(&mut self, name: &str) -> Result<(), ProfileError>
Select a profile as active
Sourcepub fn delete_profile(&mut self, name: &str) -> Result<(), ProfileError>
pub fn delete_profile(&mut self, name: &str) -> Result<(), ProfileError>
Delete a profile
Sourcepub fn list_profiles(&self) -> Vec<&Profile>
pub fn list_profiles(&self) -> Vec<&Profile>
List all profiles
Sourcepub fn get_active_profile(&self) -> Result<&Profile, ProfileError>
pub fn get_active_profile(&self) -> Result<&Profile, ProfileError>
Get the active profile
Sourcepub fn get_profile(&self, name: &str) -> Option<&Profile>
pub fn get_profile(&self, name: &str) -> Option<&Profile>
Get a profile by name
Sourcepub fn active_profile_name(&self) -> Option<&str>
pub fn active_profile_name(&self) -> Option<&str>
Get the active profile name
Sourcepub fn update_profile(
&mut self,
name: &str,
keybinds: Vec<Keybind>,
) -> Result<(), ProfileError>
pub fn update_profile( &mut self, name: &str, keybinds: Vec<Keybind>, ) -> Result<(), ProfileError>
Update a profile’s keybinds
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProfileManager
impl RefUnwindSafe for ProfileManager
impl Send for ProfileManager
impl Sync for ProfileManager
impl Unpin for ProfileManager
impl UnwindSafe for ProfileManager
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