pub struct RequestContext { /* private fields */ }Implementations§
Source§impl RequestContext
impl RequestContext
pub fn new() -> Self
pub fn with_user_id(self, id: &str) -> Self
pub fn with_user_email(self, email: &str) -> Self
pub fn with_user_anonymous(self, anonymous: bool) -> Self
pub fn with_country_code(self, code: &str) -> Self
pub fn with_region(self, region: &str) -> Self
pub fn with_city(self, city: &str) -> Self
pub fn with_manufacturer(self, manufacturer: &str) -> Self
pub fn with_device_type(self, device_type: &str) -> Self
pub fn with_os(self, os: &str) -> Self
pub fn with_os_version(self, version: &str) -> Self
pub fn with_browser(self, browser: &str) -> Self
pub fn with_browser_version(self, version: &str) -> Self
pub fn with_language(self, language: &str) -> Self
pub fn with_connection_type(self, connection_type: &str) -> Self
pub fn with_age(self, age: i32) -> Self
pub fn with_gender(self, gender: &str) -> Self
pub fn with_ip(self, ip: &str) -> Self
pub fn with_app_version(self, version: &str) -> Self
pub fn with_platform(self, platform: &str) -> Self
pub fn set(self, key: &str, value: Value) -> Self
pub fn set_many(self, values: HashMap<String, Value>) -> Self
pub fn is_empty(&self) -> bool
pub fn to_map(&self) -> HashMap<String, Value>
Trait Implementations§
Source§impl Clone for RequestContext
impl Clone for RequestContext
Source§fn clone(&self) -> RequestContext
fn clone(&self) -> RequestContext
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 moreSource§impl Debug for RequestContext
impl Debug for RequestContext
Source§impl PartialEq for RequestContext
impl PartialEq for RequestContext
impl StructuralPartialEq for RequestContext
Auto Trait Implementations§
impl Freeze for RequestContext
impl RefUnwindSafe for RequestContext
impl Send for RequestContext
impl Sync for RequestContext
impl Unpin for RequestContext
impl UnwindSafe for RequestContext
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