Trait configuration::Configuration[][src]

pub trait Configuration<'a> {
    type Encoder: Serialize;
    fn diff(&self, _: &Self) -> ConfigChange;
fn update(&mut self, _: ConfigChange);
fn get_encoder(&'a self) -> Self::Encoder;
fn typed(&self) -> ConfigChange; }
[]

The Configuration trait

There are four type of fields inside derived Configuration struct:

  1. #[config(skip)] field, these fields will not return by diff method and have not effect of update method
  2. #[config(hidden)] field, these fields have the same effect of #[config(skip)] field, in addition, these fields will not appear at the output of serializing Self::Encoder
  3. #[config(submodule)] field, these fields represent the submodule, and should also derive Configuration
  4. normal fields, the type of these fields should be implment Into and From for ConfigValue

Associated Types

type Encoder: Serialize[src]

Required methods

fn diff(&self, _: &Self) -> ConfigChange[src][]

Compare to other config, return the difference

fn update(&mut self, _: ConfigChange)[src][]

Update config with difference returned by diff

fn get_encoder(&'a self) -> Self::Encoder[src][]

Get encoder that can be serialize with serde::Serializer with the disappear of #[config(hidden)] field

fn typed(&self) -> ConfigChange[src][]

Get all fields and their type of the config

Implementors

impl<'lt> Configuration<'lt> for EncryptionConfig

impl<'lt> Configuration<'lt> for KmsConfig

impl<'lt> Configuration<'lt> for Config

impl<'lt> Configuration<'lt> for Config

impl<'lt> Configuration<'lt> for SplitConfig

impl<'lt> Configuration<'lt> for TitanCfConfig

impl<'lt> Configuration<'lt> for DefaultCfConfig

impl<'lt> Configuration<'lt> for WriteCfConfig

impl<'lt> Configuration<'lt> for LockCfConfig

impl<'lt> Configuration<'lt> for RaftCfConfig

impl<'lt> Configuration<'lt> for DbConfig

impl<'lt> Configuration<'lt> for RaftDefaultCfConfig

impl<'lt> Configuration<'lt> for RaftDbConfig

impl<'lt> Configuration<'lt> for BackupConfig

impl<'lt> Configuration<'lt> for CdcConfig

impl<'lt> Configuration<'lt> for TiKvConfig

impl<'lt> Configuration<'lt> for Config

impl<'lt> Configuration<'lt> for GcConfig

impl<'lt> Configuration<'lt> for Config

impl<'lt> Configuration<'lt> for Config

impl<'lt> Configuration<'lt> for BlockCacheConfig