[][src]Struct hdrhistogram::serialization::interval_log::IntervalLogWriterBuilder

pub struct IntervalLogWriterBuilder { /* fields omitted */ }

Prepare an IntervalLogWriter.

This type only allows writing comments and headers. Once you're done writing those things, use into_log_writer() to convert this into an IntervalLogWriter.

Methods

impl IntervalLogWriterBuilder[src]

pub fn new() -> IntervalLogWriterBuilder[src]

Create a new log writer that writes to writer and serializes histograms with serializer.

pub fn add_comment(&mut self, s: &str) -> &mut Self[src]

Add a comment line to be written when the writer is built.

Comments containing '\n' will be transformed into multiple lines of comments.

pub fn with_start_time(&mut self, time: SystemTime) -> &mut Self[src]

Set a StartTime. See the module-level documentation for more info.

This can be called multiple times, but only the value for the most recent invocation will be written.

pub fn with_base_time(&mut self, time: SystemTime) -> &mut Self[src]

Set a BaseTime. See the module-level documentation for more info.

This can be called multiple times, but only the value for the most recent invocation will be written.

pub fn with_max_value_divisor(&mut self, max_value_divisor: f64) -> &mut Self[src]

Set a max value divisor.

This is used to scale down the max value part of an interval log to something that may be more human readable. The max value in the log is only for human consumption, so you might prefer to divide by 109 to turn nanoseconds into fractional seconds, for instance.

If this is not set, 1.0 will be used.

This can be called multiple times, but only the value for the most recent invocation will be written.

pub fn begin_log_with<'a, 'b, W: 'a + Write, S: 'b + Serializer>(
    &self,
    writer: &'a mut W,
    serializer: &'b mut S
) -> Result<IntervalLogWriter<'a, 'b, W, S>, Error>
[src]

Build a LogWriter and apply any configured headers.

Trait Implementations

impl Default for IntervalLogWriterBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]