Struct journal2::JournalSettings
source · pub struct JournalSettings {
pub path: Option<String>,
pub hour_format: Option<HourFormat>,
}
Fields§
§path: Option<String>
§hour_format: Option<HourFormat>
Trait Implementations§
source§impl Clone for JournalSettings
impl Clone for JournalSettings
source§fn clone(&self) -> JournalSettings
fn clone(&self) -> JournalSettings
Returns a copy 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 JournalSettings
impl Debug for JournalSettings
source§impl Default for JournalSettings
impl Default for JournalSettings
source§impl<'de> Deserialize<'de> for JournalSettings
impl<'de> Deserialize<'de> for JournalSettings
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for JournalSettings
impl JsonSchema for JournalSettings
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Serialize for JournalSettings
impl Serialize for JournalSettings
source§impl Settings for JournalSettings
impl Settings for JournalSettings
source§const KEY: Option<&'static str> = _
const KEY: Option<&'static str> = _
The name of a key within the JSON file from which this setting should
be deserialized. If this is
None
, then the setting will be deserialized
from the root object.§type FileContent = JournalSettings
type FileContent = JournalSettings
The type that is stored in an individual JSON file.
source§fn load(
defaults: &Self::FileContent,
user_values: &[&Self::FileContent],
_: &mut AppContext
) -> Result<Self>
fn load( defaults: &Self::FileContent, user_values: &[&Self::FileContent], _: &mut AppContext ) -> Result<Self>
The logic for combining together values from one or more JSON files into the
final value for this setting. Read more
fn json_schema( generator: &mut SchemaGenerator, _: &SettingsJsonSchemaParams<'_>, _: &AppContext ) -> RootSchema
fn json_merge( default_value: &Self::FileContent, user_values: &[&Self::FileContent] ) -> Result<Self::FileContent, Error>
fn load_via_json_merge( default_value: &Self::FileContent, user_values: &[&Self::FileContent] ) -> Result<Self, Error>where Self: DeserializeOwned,
fn missing_default() -> Error
fn register(cx: &mut AppContext)where Self: Sized,
fn get<'a>(path: Option<(usize, &Path)>, cx: &'a AppContext) -> &'a Selfwhere Self: Sized,
fn get_global<'a>(cx: &'a AppContext) -> &'a Selfwhere Self: Sized,
fn override_global<'a>(settings: Self, cx: &'a mut AppContext)where Self: Sized,
Auto Trait Implementations§
impl RefUnwindSafe for JournalSettings
impl Send for JournalSettings
impl Sync for JournalSettings
impl Unpin for JournalSettings
impl UnwindSafe for JournalSettings
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