Struct reduct_rs::WriteRecordBuilder
source · 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 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