pub struct SettingsApi<'a> { /* private fields */ }
Expand description
Settings API methods
Implementations§
Source§impl<'a> SettingsApi<'a>
impl<'a> SettingsApi<'a>
Sourcepub fn get(&self) -> SettingsFetcher<'_>
pub fn get(&self) -> SettingsFetcher<'_>
Fetch one setting Notes
- If the setting is not defined, it will default to null
- Accessing an undefined setting in the client scope will not create it
Sourcepub fn reset(&self) -> SettingReset<'_>
pub fn reset(&self) -> SettingReset<'_>
Notes
- If you reset a setting in the client scope, it will be deleted and no longer appear in the list action
- If the setting does not exist, the value will be null
Sourcepub fn get_multiple(&self) -> SettingsBuilder<'_>
pub fn get_multiple(&self) -> SettingsBuilder<'_>
Fetch multiple settings Notes
- If the setting is not defined, it will default to null
- Accessing an undefined setting in the client scope will not create it
Sourcepub async fn get_all(&self) -> Result<AllSettings, Error>
pub async fn get_all(&self) -> Result<AllSettings, Error>
Fetch all the settings
Sourcepub async fn set(&self, settings: Settings) -> Result<Vec<SettingValue>, Error>
pub async fn set(&self, settings: Settings) -> Result<Vec<SettingValue>, Error>
Set the value of a writable setting
Sourcepub async fn set_client<D: Serialize + DeserializeOwned>(
&self,
name: ClientSettings,
value: D,
) -> Result<D, Error>
pub async fn set_client<D: Serialize + DeserializeOwned>( &self, name: ClientSettings, value: D, ) -> Result<D, Error>
Set the value of a client setting Note
- If the size limitations of the client scope are exceeded, an error will be returned
Auto Trait Implementations§
impl<'a> Freeze for SettingsApi<'a>
impl<'a> !RefUnwindSafe for SettingsApi<'a>
impl<'a> Send for SettingsApi<'a>
impl<'a> Sync for SettingsApi<'a>
impl<'a> Unpin for SettingsApi<'a>
impl<'a> !UnwindSafe for SettingsApi<'a>
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