Struct measureme::SerializationSink [−][src]
pub struct SerializationSink { /* fields omitted */ }
Implementations
Creates a copy of all data written so far. This method is meant to be
used for writing unit tests. It will panic if the underlying
BackingStorage
is a file.
Atomically writes num_bytes
of data to this SerializationSink
.
Atomic means the data is guaranteed to be written as a contiguous range
of bytes.
The buffer provided to the write
callback is guaranteed to be of size
num_bytes
and write
is supposed to completely fill it with the data
to be written.
The return value is the address of the data written and can be used to refer to the data later on.
Atomically writes the data in bytes
to this SerializationSink
.
Atomic means the data is guaranteed to be written as a contiguous range
of bytes.
This method may perform better than write_atomic
because it may be
able to skip the sink’s internal buffer. Use this method if the data to
be written is already available as a &[u8]
.
The return value is the address of the data written and can be used to refer to the data later on.