pub struct Telemetry { /* private fields */ }Expand description
Anonymous collection of usage metrics.
Implementations§
Source§impl Telemetry
impl Telemetry
Sourcepub fn new(config_path: &PathBuf) -> Self
pub fn new(config_path: &PathBuf) -> Self
Create a new Telemetry instance.
parameters:
config_path: the path to the configuration file (used for opt-out checks)
Sourcepub fn init_with_website_id(
endpoint: String,
website_id: String,
config_path: &PathBuf,
) -> Self
pub fn init_with_website_id( endpoint: String, website_id: String, config_path: &PathBuf, ) -> Self
Initialize a new Telemetry instance with custom endpoint and website_id.
Can be used in tests to provide mock endpoints and website IDs.
in addition to making this crate useful to other projects.
parameters:
endpoint: the API endpoint that telemetry will call
website_id: the website ID for telemetry tracking
config_path: the path to the configuration file (used for opt-out checks)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Telemetry
impl !RefUnwindSafe for Telemetry
impl Send for Telemetry
impl Sync for Telemetry
impl Unpin for Telemetry
impl UnsafeUnpin for Telemetry
impl !UnwindSafe for Telemetry
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