pub struct UsageAgent { /* private fields */ }Implementations§
Source§impl UsageAgent
impl UsageAgent
pub fn new( token: String, endpoint: String, target_id: Option<String>, buffer_size: usize, connect_timeout: Duration, request_timeout: Duration, accept_invalid_certs: bool, flush_interval: Duration, user_agent: String, ) -> Self
pub fn add_report( &self, execution_report: ExecutionReport, ) -> Result<(), AgentError>
pub async fn send_report(&self, report: Report) -> Result<(), AgentError>
pub fn flush_if_full(&self, size: usize) -> Result<(), AgentError>
pub async fn flush(&self)
pub async fn start_flush_interval(&self, token: Option<CancellationToken>)
Trait Implementations§
Source§impl Clone for UsageAgent
impl Clone for UsageAgent
Source§fn clone(&self) -> UsageAgent
fn clone(&self) -> UsageAgent
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 moreAuto Trait Implementations§
impl Freeze for UsageAgent
impl !RefUnwindSafe for UsageAgent
impl Send for UsageAgent
impl Sync for UsageAgent
impl Unpin for UsageAgent
impl !UnwindSafe for UsageAgent
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