statsig_rust/gcir/
gcir_options.rs1use serde::Deserialize;
2
3use crate::{GCIRResponseFormat, HashAlgorithm};
4
5#[derive(Default, Deserialize)]
6pub struct ClientInitResponseOptions {
7 pub hash_algorithm: Option<HashAlgorithm>,
8 pub client_sdk_key: Option<String>,
9 pub include_local_overrides: Option<bool>,
10 pub response_format: Option<GCIRResponseFormat>,
11}
12
13impl ClientInitResponseOptions {
14 pub(crate) fn get_hash_algorithm(&self) -> &HashAlgorithm {
15 self.hash_algorithm.as_ref().unwrap_or(&HashAlgorithm::Djb2)
16 }
17}