pub struct Preferences(/* private fields */);Available on crate feature
preferences only.Expand description
Backend preferences.
Implementations§
Source§impl BackendPreferences
impl BackendPreferences
Sourcepub fn new(target: BackendTarget) -> Self
pub fn new(target: BackendTarget) -> Self
Create new preferences.
Trait Implementations§
Source§impl PreferenceManager for BackendPreferences
impl PreferenceManager for BackendPreferences
Source§fn load_global_preferences<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_global_preferences<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load global preferences.
Source§fn load_account_preferences<'life0, 'life1, 'async_trait>(
&'life0 self,
accounts: &'life1 [PublicIdentity],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_account_preferences<'life0, 'life1, 'async_trait>(
&'life0 self,
accounts: &'life1 [PublicIdentity],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load and initialize preferences for a list of accounts.
Source§fn global_preferences(&self) -> Arc<Mutex<Preferences<Self::Error>>>
fn global_preferences(&self) -> Arc<Mutex<Preferences<Self::Error>>>
Global preferences for all accounts.
Source§fn account_preferences<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 AccountId,
) -> Pin<Box<dyn Future<Output = Option<Arc<Mutex<Preferences<Self::Error>>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn account_preferences<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 AccountId,
) -> Pin<Box<dyn Future<Output = Option<Arc<Mutex<Preferences<Self::Error>>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Preferences for an account.
Source§fn new_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 AccountId,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn new_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 AccountId,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add a new account to the preference manager. Read more
Auto Trait Implementations§
impl !Freeze for BackendPreferences
impl !RefUnwindSafe for BackendPreferences
impl Send for BackendPreferences
impl Sync for BackendPreferences
impl Unpin for BackendPreferences
impl !UnwindSafe for BackendPreferences
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