[−][src]Trait measureme::SerializationSink
Required methods
fn from_path(path: &Path) -> Result<Self, Box<dyn Error>>
fn write_atomic<W>(&self, num_bytes: usize, write: W) -> Addr where
W: FnOnce(&mut [u8]),
W: FnOnce(&mut [u8]),
Atomically write num_bytes
to the sink. The implementation must ensure
that concurrent invocations of write_atomic
do not conflict with each
other.
The write
argument is a function that must fill the output buffer
passed to it. The output buffer is guaranteed to be exactly num_bytes
large.
Provided methods
fn write_bytes_atomic(&self, bytes: &[u8]) -> Addr
Same as write_atomic() but might be faster in cases where bytes to be written are already present in a buffer (as opposed to when it is benefical to directly serialize into the output buffer).
Implementors
impl SerializationSink for ByteVecSink
[src]
fn from_path(_path: &Path) -> Result<Self, Box<dyn Error>>
[src]
fn write_atomic<W>(&self, num_bytes: usize, write: W) -> Addr where
W: FnOnce(&mut [u8]),
[src]
W: FnOnce(&mut [u8]),
impl SerializationSink for FileSerializationSink
[src]
fn from_path(path: &Path) -> Result<Self, Box<dyn Error>>
[src]
fn write_atomic<W>(&self, num_bytes: usize, write: W) -> Addr where
W: FnOnce(&mut [u8]),
[src]
W: FnOnce(&mut [u8]),