pub struct WriteRecordBuilder { /* private fields */ }
Expand description
Builder for a write record request.
Implementations§
Source§impl WriteRecordBuilder
impl WriteRecordBuilder
Sourcepub fn timestamp(self, timestamp: SystemTime) -> Self
pub fn timestamp(self, timestamp: SystemTime) -> Self
Set the timestamp of the record to write.
Sourcepub fn timestamp_us(self, timestamp: u64) -> Self
pub fn timestamp_us(self, timestamp: u64) -> Self
Set the timestamp of the record to write as a unix timestamp in microseconds.
Sourcepub fn add_label<Str1, Str2>(self, key: Str1, value: Str2) -> Self
pub fn add_label<Str1, Str2>(self, key: Str1, value: Str2) -> Self
Add a label to the record to write.
Sourcepub fn content_type<Str>(self, content_type: Str) -> Self
pub fn content_type<Str>(self, content_type: Str) -> Self
Set the content type of the record to write.
Sourcepub fn content_length(self, content_length: u64) -> Self
pub fn content_length(self, content_length: u64) -> Self
Set the content length of the record to write (only required if the data is a stream).
Sourcepub fn stream<S>(self, stream: S) -> Self
pub fn stream<S>(self, stream: S) -> Self
Set the data of the record to write as a stream. The content length must be set.
Sourcepub async fn send(self) -> Result<(), ReductError>
pub async fn send(self) -> Result<(), ReductError>
Send the write record request.
Auto Trait Implementations§
impl !Freeze for WriteRecordBuilder
impl !RefUnwindSafe for WriteRecordBuilder
impl Send for WriteRecordBuilder
impl Sync for WriteRecordBuilder
impl Unpin for WriteRecordBuilder
impl !UnwindSafe for WriteRecordBuilder
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