pub enum TemplateOrigin {
Builtin,
Catalog,
User,
}Expand description
Where a dcs_templates row came from, and – since TuneRunRow snapshots a copy of one
at TuneRunRow::start time – where a run’s snapshotted template came from too. Kept as
one definition reused by both tables (dcs_templates.origin, tune_runs.template_origin)
rather than two, so they can never drift on what the possible origins even are, and so a
run’s history never needs to look the original row back up to know its provenance –
which matters precisely because that row might no longer exist, or might have been
re-imported under a different origin since.
builtin and catalog rows are re-upserted from their respective data files on every
startup (crate::seed::seed_templates); user rows (hand-imported via bhtune template import, or created through a future GUI editor) are never auto-touched – auto-reseeding
a hand-edited row would silently discard someone’s own customization, while not
reseeding a shipped preset would mean a suffix/unit fix in a later release never reaches
existing installs.
Variants§
Builtin
One of the templates bhtune-core ships embedded in its own binary (see
template-catalog).
Catalog
Loaded from a user-supplied catalog file ($XDG_CONFIG_HOME/bhtune/templates.toml
and platform equivalents, or an explicit --templates/BHTUNE_TEMPLATES override –
see template-user-catalog), auto-seeded on every startup the same way Builtin
rows are.
User
Hand-imported (bhtune template import) or otherwise created by whoever is running
bhtune.
Trait Implementations§
Source§impl Clone for TemplateOrigin
impl Clone for TemplateOrigin
Source§fn clone(&self) -> TemplateOrigin
fn clone(&self) -> TemplateOrigin
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for TemplateOrigin
impl ComposeSchema for TemplateOrigin
impl Copy for TemplateOrigin
Source§impl Debug for TemplateOrigin
impl Debug for TemplateOrigin
Source§impl<'de> Deserialize<'de> for TemplateOrigin
impl<'de> Deserialize<'de> for TemplateOrigin
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>,
impl Eq for TemplateOrigin
Source§impl Hash for TemplateOrigin
impl Hash for TemplateOrigin
Source§impl PartialEq for TemplateOrigin
impl PartialEq for TemplateOrigin
Source§fn eq(&self, other: &TemplateOrigin) -> bool
fn eq(&self, other: &TemplateOrigin) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TemplateOrigin
impl Serialize for TemplateOrigin
impl StructuralPartialEq for TemplateOrigin
Auto Trait Implementations§
impl Freeze for TemplateOrigin
impl RefUnwindSafe for TemplateOrigin
impl Send for TemplateOrigin
impl Sync for TemplateOrigin
impl Unpin for TemplateOrigin
impl UnsafeUnpin for TemplateOrigin
impl UnwindSafe for TemplateOrigin
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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>
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>
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>
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