Skip to main content

RecordingHandle

Trait RecordingHandle 

Source
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§

Source

fn append<'a>(&'a self, buf: BufferRef<'a>) -> BoxFuture<'a, Result<u64, Error>>

Append data to the handle.

Source

fn allocate_buffer(&self, size: usize) -> BoxFuture<'_, Buffer<'_>>

Source

fn block_size(&self) -> usize

Source

fn commit(self: Box<Self>) -> BoxFuture<'static, Result<(), Error>>

The recording is finished being appended to the file. Commit it.

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§