pub struct ClientRpcUserSettings<'a> { /* private fields */ }Expand description
user.settings.* RPCs.
Implementations§
Source§impl<'a> ClientRpcUserSettings<'a>
impl<'a> ClientRpcUserSettings<'a>
Sourcepub async fn reload(&self) -> Result<(), Error>
pub async fn reload(&self) -> Result<(), Error>
Drops this runtime process’s in-memory user settings cache so the next settings read observes disk.
Wire method: user.settings.reload.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn get(&self) -> Result<UserSettingsGetResult, Error>
pub async fn get(&self) -> Result<UserSettingsGetResult, Error>
Lists every known user setting (settings.json overlaid with the legacy config.json, config.json wins), each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
Wire method: user.settings.get.
§Returns
Per-key metadata for every known user setting (settings.json overlaid with the legacy config.json, config.json wins), including settings left at their default. Excludes repository- and enterprise-managed overrides.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn set(
&self,
params: UserSettingsSetRequest,
) -> Result<UserSettingsSetResult, Error>
pub async fn set( &self, params: UserSettingsSetRequest, ) -> Result<UserSettingsSetResult, Error>
Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed. Returns the keys whose new value is shadowed by a legacy config.json entry (config.json wins on read), which the runtime leaves in place — such writes do not take effect until the legacy value is removed.
Wire method: user.settings.set.
§Parameters
params- Partial user settings to write to settings.json. Each top-level key is written individually, replacing the existing value; a key whose value is null is removed.
§Returns
Outcome of writing user settings.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for ClientRpcUserSettings<'a>
impl<'a> Clone for ClientRpcUserSettings<'a>
Source§fn clone(&self) -> ClientRpcUserSettings<'a>
fn clone(&self) -> ClientRpcUserSettings<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more