pub struct Settings { /* private fields */ }Implementations§
Source§impl Settings
impl Settings
Sourcepub fn global() -> Ref<Self>
pub fn global() -> Ref<Self>
Retrieve the global settings instance, this will be populated by both the core and plugins.
If you wish to construct your own instance, use Settings::new_with_id instead.
Sourcepub fn global_default() -> Ref<Self>
pub fn global_default() -> Ref<Self>
Retrieve the default global settings instance, this is the same as Settings::global but
the values will be set to the registered default values.
If you wish to construct your own instance, use Settings::new_with_id instead.
Sourcepub fn new_with_id(instance_id: &str) -> Ref<Self>
pub fn new_with_id(instance_id: &str) -> Ref<Self>
Create (or get) the settings instance with the given id.
Two special instances can be retrieved by passing DEFAULT_INSTANCE_ID and GLOBAL_INSTANCE_ID.
pub fn set_resource_id(&self, resource_id: &str)
pub fn serialize_schema(&self) -> String
pub fn deserialize_schema(&self, schema: &str) -> bool
pub fn deserialize_schema_with_scope( &self, schema: &str, scope: SettingsScope, ) -> bool
pub fn contains(&self, key: &str) -> bool
pub fn keys(&self) -> Array<BnString>
pub fn get_bool(&self, key: &str) -> bool
pub fn get_bool_with_opts( &self, key: &str, options: &mut QueryOptions<'_>, ) -> bool
pub fn get_double(&self, key: &str) -> f64
pub fn get_double_with_opts( &self, key: &str, options: &mut QueryOptions<'_>, ) -> f64
pub fn get_integer(&self, key: &str) -> u64
pub fn get_integer_with_opts( &self, key: &str, options: &mut QueryOptions<'_>, ) -> u64
pub fn get_string(&self, key: &str) -> String
pub fn get_string_with_opts( &self, key: &str, options: &mut QueryOptions<'_>, ) -> String
pub fn get_string_list(&self, key: &str) -> Array<BnString>
pub fn get_string_list_with_opts( &self, key: &str, options: &mut QueryOptions<'_>, ) -> Array<BnString>
pub fn get_json(&self, key: &str) -> String
pub fn get_json_with_opts( &self, key: &str, options: &mut QueryOptions<'_>, ) -> String
pub fn set_bool(&self, key: &str, value: bool)
pub fn set_bool_with_opts( &self, key: &str, value: bool, options: &QueryOptions<'_>, )
pub fn set_double(&self, key: &str, value: f64)
pub fn set_double_with_opts( &self, key: &str, value: f64, options: &QueryOptions<'_>, )
pub fn set_integer(&self, key: &str, value: u64)
pub fn set_integer_with_opts( &self, key: &str, value: u64, options: &QueryOptions<'_>, )
pub fn set_string(&self, key: &str, value: &str)
pub fn set_string_with_opts( &self, key: &str, value: &str, options: &QueryOptions<'_>, )
pub fn set_string_list<I: IntoIterator<Item = String>>( &self, key: &str, value: I, ) -> bool
pub fn set_string_list_with_opts<I: IntoIterator<Item = String>>( &self, key: &str, value: I, options: &QueryOptions<'_>, ) -> bool
pub fn set_json(&self, key: &str, value: &str) -> bool
pub fn set_json_with_opts( &self, key: &str, value: &str, options: &QueryOptions<'_>, ) -> bool
pub fn get_property_string(&self, key: &str, property: &str) -> String
pub fn get_property_string_list( &self, key: &str, property: &str, ) -> Array<BnString>
pub fn update_bool_property(&self, key: &str, property: &str, value: bool)
pub fn update_integer_property(&self, key: &str, property: &str, value: u64)
pub fn update_double_property(&self, key: &str, property: &str, value: f64)
pub fn update_string_property(&self, key: &str, property: &str, value: &str)
pub fn update_string_list_property<I: IntoIterator<Item = String>>( &self, key: &str, property: &str, value: I, )
pub fn register_group(&self, group: &str, title: &str) -> bool
pub fn register_setting_json(&self, group: &str, properties: &str) -> bool
Trait Implementations§
Source§impl ToOwned for Settings
impl ToOwned for Settings
impl Eq for Settings
impl Send for Settings
impl StructuralPartialEq for Settings
impl Sync for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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