Struct google_firebaseremoteconfig1::api::RemoteConfig[][src]

pub struct RemoteConfig {
    pub parameters: Option<HashMap<String, RemoteConfigParameter>>,
    pub conditions: Option<Vec<RemoteConfigCondition>>,
}
Expand description

The RemoteConfig consists of a list of conditions (which can be thought of as named “if” statements) and a map of parameters (parameter key to a structure containing an optional default value, as well as a optional submap of (condition name to value when that condition is true).

Activities

This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).

Fields

parameters: Option<HashMap<String, RemoteConfigParameter>>

Map of parameter keys to their optional default values and optional submap of (condition name : value). Order doesn’t affect semantics, and so is sorted by the server. The ‘key’ values of the params must be unique.

conditions: Option<Vec<RemoteConfigCondition>>

The list of named conditions. The order does affect the semantics. The condition_name values of these entries must be unique.

The resolved value of a config parameter P is determined as follow:

  • Let Y be the set of values from the submap of P that refer to conditions that evaluate to true.
  • If Y is non empty, the value is taken from the specific submap in Y whose condition_name is the earliest in this condition list.
  • Else, if P has a default value option (condition_name is empty) then the value is taken from that option.
  • Else, parameter P has no value and is omitted from the config result.

Example: parameter key “p1”, default value “v1”, submap specified as {“c1”: v2, “c2”: v3} where “c1” and “c2” are names of conditions in the condition list (where “c1” in this example appears before “c2”). The value of p1 would be v2 as long as c1 is true. Otherwise, if c2 is true, p1 would evaluate to v3, and if c1 and c2 are both false, p1 would evaluate to v1. If no default value was specified, and c1 and c2 were both false, no value for p1 would be generated.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.