pub trait RecordingHandle: Send + Sync {
// Required methods
fn append<'a>(
&'a self,
buf: BufferRef<'a>,
) -> BoxFuture<'a, Result<u64, Error>>;
fn allocate_buffer(&self, size: usize) -> BoxFuture<'_, Buffer<'_>>;
fn block_size(&self) -> usize;
fn commit(self: Box<Self>) -> BoxFuture<'static, Result<(), Error>>;
fn abort_cleanup(self: Box<Self>);
}Expand description
A handle for recording a profile to.
Required Methods§
Sourcefn append<'a>(&'a self, buf: BufferRef<'a>) -> BoxFuture<'a, Result<u64, Error>>
fn append<'a>(&'a self, buf: BufferRef<'a>) -> BoxFuture<'a, Result<u64, Error>>
Append data to the handle.
fn allocate_buffer(&self, size: usize) -> BoxFuture<'_, Buffer<'_>>
fn block_size(&self) -> usize
Sourcefn commit(self: Box<Self>) -> BoxFuture<'static, Result<(), Error>>
fn commit(self: Box<Self>) -> BoxFuture<'static, Result<(), Error>>
The recording is finished being appended to the file. Commit it.
Sourcefn abort_cleanup(self: Box<Self>)
fn abort_cleanup(self: Box<Self>)
When the recording fails or is stopped prematurely this will be called to clean up the resources, delete the backing data.