pub struct SettingDefinition { /* private fields */ }Expand description
One canonical semantic definition projected from an existing table entry.
Implementations§
Source§impl SettingDefinition
impl SettingDefinition
pub fn identity(&self) -> &SettingIdentity
pub fn id(&self) -> Option<&SettingId>
pub fn scope(&self) -> SettingScope
pub fn path(&self) -> &str
pub fn domain(&self) -> &SettingValueDomain
pub fn target_kind(&self) -> SettingTargetKind
pub fn presentation(&self) -> &SettingPresentation
pub fn localized_name( &self, locale: &str, target: &SettingTarget, ) -> Result<Option<&'static str>, GameplayDataError>
pub fn provenance(&self) -> SettingProvenance
Sourcepub fn applicability(
&self,
target: &SettingTarget,
) -> Result<Applicability, GameplayDataError>
pub fn applicability( &self, target: &SettingTarget, ) -> Result<Applicability, GameplayDataError>
Query effective applicability without exposing table deduplication.
pub fn effective_number(&self, authored: f64) -> Option<EffectiveNumber>
Sourcepub fn read(
&self,
settings: &Settings,
target: &SettingTarget,
) -> Result<SettingOccurrence, SettingOperationError>
pub fn read( &self, settings: &Settings, target: &SettingTarget, ) -> Result<SettingOccurrence, SettingOperationError>
Read an existing source-preserving occurrence with its authored value and, when evidenced, its effective numeric value.
Sourcepub fn write(
&self,
settings: &mut Settings,
target: &SettingTarget,
value: SettingValue,
) -> Result<(), SettingOperationError>
pub fn write( &self, settings: &mut Settings, target: &SettingTarget, value: SettingValue, ) -> Result<(), SettingOperationError>
Update one existing occurrence without rebuilding the surrounding settings tree. Unknown and unrelated source structure is untouched.
Trait Implementations§
Source§impl Clone for SettingDefinition
impl Clone for SettingDefinition
Source§fn clone(&self) -> SettingDefinition
fn clone(&self) -> SettingDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SettingDefinition
impl Debug for SettingDefinition
Source§impl PartialEq for SettingDefinition
impl PartialEq for SettingDefinition
impl StructuralPartialEq for SettingDefinition
Auto Trait Implementations§
impl Freeze for SettingDefinition
impl RefUnwindSafe for SettingDefinition
impl Send for SettingDefinition
impl Sync for SettingDefinition
impl Unpin for SettingDefinition
impl UnsafeUnpin for SettingDefinition
impl UnwindSafe for SettingDefinition
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