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§
Sourcefn 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 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.
fn allocate_buffer(&self, size: usize) -> BufferFuture<'_> ⓘ
fn block_size(&self) -> usize
Sourcefn commit<'async_trait>(
self: Box<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
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.
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.
Sourcefn filter_events(&self) -> bool
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".