pub struct Client { /* private fields */ }
Expand description
Statsig client that has a local cache and syncs with the API periodically.
Implementations§
Source§impl Client
impl Client
pub async fn new(api_key: String, options: StatsigOptions) -> Result<Arc<Self>>
pub async fn check_gate( self: Arc<Self>, gate: String, user: StatsigUser, ) -> Result<bool>
pub async fn get_dynamic_config<T: DeserializeOwned>( self: Arc<Self>, config: String, user: StatsigUser, ) -> Result<T>
Sourcepub async fn get_config<T: DeserializeOwned>(
self: Arc<Self>,
config: String,
user: StatsigUser,
) -> Result<StatsigConfig<T>>
pub async fn get_config<T: DeserializeOwned>( self: Arc<Self>, config: String, user: StatsigUser, ) -> Result<StatsigConfig<T>>
Returns the value, together with the metadata about the group that matched the check
pub async fn log_event(&self, statsig_post: &StatsigPost) -> Result<()>
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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