Skip to main content

RecordingHandle

Trait RecordingHandle 

Source
pub trait RecordingHandle: Send + Sync {
    // Required methods
    fn append<'a, 'async_trait>(
        &'a self,
        buf: BufferRef<'a>,
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
    fn allocate_buffer(&self, size: usize) -> BufferFuture<'_> ⓘ;
    fn block_size(&self) -> usize;
    fn commit<'async_trait>(
        self: Box<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn abort_cleanup(self: Box<Self>);
    fn filter_events(&self) -> bool;
}
Expand description

A handle for recording a profile to.

Required Methods§

Source

fn append<'a, 'async_trait>( &'a self, buf: BufferRef<'a>, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Append data to the handle.

Source

fn allocate_buffer(&self, size: usize) -> BufferFuture<'_> ⓘ

Source

fn block_size(&self) -> usize

Source

fn commit<'async_trait>( self: Box<Self>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,

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.

Source

fn filter_events(&self) -> bool

Returns true if events should be filtered based on whether the file was opened during the recording and encryption settings. For now this is true for FileRecordingHandle and false for AssociatedRecordingHandle.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§