pub struct RecordBuilder { /* private fields */ }
Implementations§
Source§impl RecordBuilder
impl RecordBuilder
pub fn new() -> Self
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 timestamp(self, timestamp: SystemTime) -> Self
pub fn timestamp(self, timestamp: SystemTime) -> Self
Set the timestamp of the record to write.
Sourcepub fn labels(self, labels: Labels) -> Self
pub fn labels(self, labels: Labels) -> Self
Set the labels of the record to write. This replaces all existing labels.
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: usize) -> Self
pub fn content_length(self, content_length: usize) -> Self
Set the content length of the record to write
Note: use this with stream data
Sourcepub fn data<D>(self, data: D) -> Self
pub fn data<D>(self, data: D) -> Self
Set the content of the record
Note: use this with data that fits in memory
Sourcepub fn stream(self, stream: RecordStream) -> Self
pub fn stream(self, stream: RecordStream) -> Self
Set the content of the record as a stream
Auto Trait Implementations§
impl Freeze for RecordBuilder
impl !RefUnwindSafe for RecordBuilder
impl Send for RecordBuilder
impl Sync for RecordBuilder
impl Unpin for RecordBuilder
impl !UnwindSafe for RecordBuilder
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