pub struct Builder { /* private fields */ }Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
pub fn set_anonymous_distinct_id( self, anonymous_distinct_id: Option<AnonymousDistinctId>, ) -> Self
pub fn set_distinct_id(self, distinct_id: Option<DistinctId>) -> Self
pub fn set_device_id(self, device_id: Option<DeviceId>) -> Self
pub fn set_facts(self, facts: Option<Map>) -> Self
pub fn set_groups(self, groups: Option<Map>) -> Self
pub fn add_fact( self, key: impl Into<String> + Debug, value: impl Into<Value>, ) -> Self
pub fn set_endpoint(self, endpoint: Option<String>) -> Self
Sourcepub fn set_enable_reporting(self, enable_reporting: bool) -> Self
pub fn set_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!()
.set_enable_reporting(!cli.no_telemetry)
.build_or_default()
.await;pub fn set_timeout(self, duration: Option<Duration>) -> Self
pub fn set_certificate(self, certificate: Option<Certificate>) -> Self
pub fn set_proxy(self, proxy: Option<Url>) -> 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 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