pub struct SettingRegistry {
pub categories: Vec<SettingCategory>,
pub entries: HashMap<SettingKey, SettingEntry>,
/* private fields */
}Expand description
設定レジストリ
Fields§
§categories: Vec<SettingCategory>設定カテゴリ
entries: HashMap<SettingKey, SettingEntry>設定項目
Implementations§
Source§impl SettingRegistry
impl SettingRegistry
Sourcepub fn get(key: &SettingKey) -> Option<SettingValueType>
pub fn get(key: &SettingKey) -> Option<SettingValueType>
Sourcepub async fn save_by_key(key: SettingKey) -> Result<()>
pub async fn save_by_key(key: SettingKey) -> Result<()>
特定の設定項目の値を保存します。
Sourcepub fn get_default(key: SettingKey) -> Option<SettingValueType>
pub fn get_default(key: SettingKey) -> Option<SettingValueType>
設定項目の初期値を取得します。
Sourcepub async fn immediate_apply(
key: SettingKey,
value: SettingValueType,
) -> Result<()>
pub async fn immediate_apply( key: SettingKey, value: SettingValueType, ) -> Result<()>
設定項目を変更し、値を保存します。
Sourcepub fn get_values() -> HashMap<SettingKey, SettingValueType>
pub fn get_values() -> HashMap<SettingKey, SettingValueType>
設定項目の初期値リストを取得します。
Sourcepub fn get_categories() -> &'static Vec<SettingCategory>
pub fn get_categories() -> &'static Vec<SettingCategory>
設定カテゴリを取得します。
Sourcepub fn get_entries() -> &'static HashMap<SettingKey, SettingEntry>
pub fn get_entries() -> &'static HashMap<SettingKey, SettingEntry>
設定項目を取得します。
Trait Implementations§
Source§impl Debug for SettingRegistry
impl Debug for SettingRegistry
Source§impl Default for SettingRegistry
impl Default for SettingRegistry
Source§fn default() -> SettingRegistry
fn default() -> SettingRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SettingRegistry
impl RefUnwindSafe for SettingRegistry
impl Send for SettingRegistry
impl Sync for SettingRegistry
impl Unpin for SettingRegistry
impl UnwindSafe for SettingRegistry
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().