pub struct GrowthBookClient {
pub gb: Arc<RwLock<GrowthBook>>,
}
Fields§
§gb: Arc<RwLock<GrowthBook>>
Implementations§
Source§impl GrowthBookClient
impl GrowthBookClient
pub async fn new( api_url: &str, sdk_key: &str, update_interval: Option<Duration>, http_timeout: Option<Duration>, ) -> Result<Self, GrowthbookError>
pub fn is_on( &self, feature_name: &str, user_attributes: Option<Vec<GrowthBookAttribute>>, ) -> bool
pub fn is_off( &self, feature_name: &str, user_attributes: Option<Vec<GrowthBookAttribute>>, ) -> bool
pub fn feature_result( &self, feature_name: &str, user_attributes: Option<Vec<GrowthBookAttribute>>, ) -> FeatureResult
pub fn total_features(&self) -> usize
Trait Implementations§
Source§impl Clone for GrowthBookClient
impl Clone for GrowthBookClient
Source§fn clone(&self) -> GrowthBookClient
fn clone(&self) -> GrowthBookClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for GrowthBookClient
impl RefUnwindSafe for GrowthBookClient
impl Send for GrowthBookClient
impl Sync for GrowthBookClient
impl Unpin for GrowthBookClient
impl UnwindSafe for GrowthBookClient
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