pub struct GrowthBookClientBuilder { /* private fields */ }Implementations§
Source§impl GrowthBookClientBuilder
impl GrowthBookClientBuilder
pub fn new() -> Self
pub fn api_url(self, api_url: String) -> Self
pub fn client_key(self, client_key: String) -> Self
pub fn cache(self, cache: Arc<dyn FeatureCache>) -> Self
pub fn ttl(self, ttl: Duration) -> Self
pub fn auto_refresh(self, auto_refresh: bool) -> Self
pub fn refresh_interval(self, interval: Duration) -> Self
pub fn attributes( self, attributes: HashMap<String, GrowthBookAttribute>, ) -> Self
pub fn on_feature_usage( self, callback: Box<dyn Fn(String, FeatureResult) + Send + Sync>, ) -> Self
pub fn on_experiment_viewed( self, callback: Box<dyn Fn(ExperimentResult) + Send + Sync>, ) -> Self
pub fn add_on_refresh(self, callback: Box<dyn Fn() + Send + Sync>) -> Self
pub fn features(self, features: HashMap<String, GrowthBookFeature>) -> Self
pub fn features_json(self, features_json: Value) -> Result<Self, Error>
pub fn decryption_key(self, decryption_key: String) -> Self
pub async fn build(self) -> Result<GrowthBookClient, GrowthbookError>
Auto Trait Implementations§
impl Freeze for GrowthBookClientBuilder
impl !RefUnwindSafe for GrowthBookClientBuilder
impl Send for GrowthBookClientBuilder
impl Sync for GrowthBookClientBuilder
impl Unpin for GrowthBookClientBuilder
impl !UnwindSafe for GrowthBookClientBuilder
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