pub enum SettingValueType {
Bool(Option<bool>),
Int(Option<i64>),
Float(Option<f64>),
String(Option<String>),
}Expand description
設定の項目値を型付きで表現します。
Variants§
Implementations§
Source§impl SettingValueType
impl SettingValueType
Sourcepub fn set(self, v: SettingValueType)
pub fn set(self, v: SettingValueType)
設定項目の値を設定します。
Sourcepub async fn save(
&self,
conn: &mut SqliteConnection,
setting_key: SettingKey,
) -> Result<()>
pub async fn save( &self, conn: &mut SqliteConnection, setting_key: SettingKey, ) -> Result<()>
設定項目を保存します。
Sourcepub fn to_opt_string(self) -> Option<String>
pub fn to_opt_string(self) -> Option<String>
設定値を文字列として取得します。
Trait Implementations§
Source§impl Clone for SettingValueType
impl Clone for SettingValueType
Source§fn clone(&self) -> SettingValueType
fn clone(&self) -> SettingValueType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SettingValueType
impl Debug for SettingValueType
Source§impl From<&str> for SettingValueType
impl From<&str> for SettingValueType
Source§impl From<SettingValueType> for Option<String>
impl From<SettingValueType> for Option<String>
Source§fn from(value: SettingValueType) -> Self
fn from(value: SettingValueType) -> Self
Converts to this type from the input type.
Source§impl From<SettingValueType> for Option<bool>
impl From<SettingValueType> for Option<bool>
Source§fn from(value: SettingValueType) -> Self
fn from(value: SettingValueType) -> Self
Converts to this type from the input type.
Source§impl From<SettingValueType> for Option<f64>
impl From<SettingValueType> for Option<f64>
Source§fn from(value: SettingValueType) -> Self
fn from(value: SettingValueType) -> Self
Converts to this type from the input type.
Source§impl From<SettingValueType> for Option<i64>
impl From<SettingValueType> for Option<i64>
Source§fn from(value: SettingValueType) -> Self
fn from(value: SettingValueType) -> Self
Converts to this type from the input type.
Source§impl From<String> for SettingValueType
impl From<String> for SettingValueType
Source§impl From<bool> for SettingValueType
impl From<bool> for SettingValueType
Source§impl From<f32> for SettingValueType
impl From<f32> for SettingValueType
Source§impl From<f64> for SettingValueType
impl From<f64> for SettingValueType
Source§impl From<i16> for SettingValueType
impl From<i16> for SettingValueType
Source§impl From<i32> for SettingValueType
impl From<i32> for SettingValueType
Source§impl From<i64> for SettingValueType
impl From<i64> for SettingValueType
Auto Trait Implementations§
impl Freeze for SettingValueType
impl RefUnwindSafe for SettingValueType
impl Send for SettingValueType
impl Sync for SettingValueType
impl Unpin for SettingValueType
impl UnwindSafe for SettingValueType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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