pub struct Builder { /* private fields */ }Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
pub fn anonymous_distinct_id( self, anonymous_distinct_id: Option<AnonymousDistinctId>, ) -> Self
pub fn set_anonymous_distinct_id( &mut self, anonymous_distinct_id: Option<AnonymousDistinctId>, ) -> &mut Self
pub fn distinct_id(self, distinct_id: Option<DistinctId>) -> Self
pub fn set_distinct_id(&mut self, distinct_id: Option<DistinctId>) -> &mut Self
pub fn device_id(self, device_id: Option<DeviceId>) -> Self
pub fn set_device_id(&mut self, device_id: Option<DeviceId>) -> &mut Self
pub fn facts(self, facts: Option<Map>) -> Self
pub fn set_facts(&mut self, facts: Option<Map>) -> &mut Self
pub fn groups(self, groups: Option<Groups>) -> Self
pub fn set_groups(&mut self, groups: Option<Groups>) -> &mut Self
pub fn fact(self, key: impl Into<String>, value: impl Into<Value>) -> Self
pub fn set_fact( &mut self, key: impl Into<String>, value: impl Into<Value>, ) -> &mut Self
pub fn endpoint(self, endpoint: Option<String>) -> Self
pub fn set_endpoint(&mut self, endpoint: Option<String>) -> &mut Self
Sourcepub fn enable_reporting(self, enable_reporting: bool) -> Self
pub fn enable_reporting(self, enable_reporting: bool) -> Self
Set whether reporting is enabled or disabled. Reporting is enabled by default, but this function can be used in a pipeline for easy configuration:
use detsys_ids_client::builder;
struct Cli {
no_telemetry: bool,
}
let cli = Cli { no_telemetry: false, };
let (recorder, worker) = builder!()
.enable_reporting(!cli.no_telemetry)
.build_or_default()
.await;pub fn set_enable_reporting(&mut self, enable_reporting: bool) -> &mut Self
pub fn timeout(self, duration: Option<Duration>) -> Self
pub fn set_timeout(&mut self, duration: Option<Duration>) -> &mut Self
pub fn certificate(self, certificate: Option<Certificate>) -> Self
pub fn set_certificate(&mut self, certificate: Option<Certificate>) -> &mut Self
pub fn proxy(self, proxy: Option<Url>) -> Self
pub fn set_proxy(&mut self, proxy: Option<Url>) -> &mut Self
pub async fn try_build(self) -> Result<(Recorder, Worker), TransportsError>
pub async fn build_or_default(self) -> (Recorder, Worker)
pub async fn try_build_with<S: SystemSnapshotter, P: Storage>( self, snapshotter: S, storage: P, ) -> Result<(Recorder, Worker), TransportsError>
pub async fn build_or_default_with<S: SystemSnapshotter, P: Storage>( self, snapshotter: S, storage: P, ) -> (Recorder, Worker)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
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