pub struct TelemetryUploader { /* private fields */ }Expand description
Uploader — owns the HTTP client and knows how to ship a batch to endpoint.
Implementations§
Source§impl TelemetryUploader
impl TelemetryUploader
pub fn new(endpoint: String, auth: TelemetryAuth) -> Result<Self>
Sourcepub async fn upload(&self, batch: &TelemetryBatch) -> Result<()>
pub async fn upload(&self, batch: &TelemetryBatch) -> Result<()>
POST a batch; returns Ok when the server accepted it (2xx).
Trait Implementations§
Source§impl Clone for TelemetryUploader
impl Clone for TelemetryUploader
Source§fn clone(&self) -> TelemetryUploader
fn clone(&self) -> TelemetryUploader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TelemetryUploader
impl !RefUnwindSafe for TelemetryUploader
impl Send for TelemetryUploader
impl Sync for TelemetryUploader
impl Unpin for TelemetryUploader
impl UnsafeUnpin for TelemetryUploader
impl !UnwindSafe for TelemetryUploader
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