pub trait ErasedCoreMemory: Send + Sync {
// Required methods
fn blocks_erased(
&self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CoreMemoryBlock>>> + Send + '_>>;
fn get_block_erased<'a>(
&'a self,
label: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<CoreMemoryBlock>>> + Send + 'a>>;
fn put_block_erased(
&self,
block: CoreMemoryBlock,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>;
fn append_block_erased<'a>(
&'a self,
label: &'a str,
text: &'a str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
fn remove_block_erased<'a>(
&'a self,
label: &'a str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'a>>;
fn render_erased(
&self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + '_>>;
}Expand description
Object-safe wrapper for the CoreMemory trait, enabling dynamic dispatch
via Arc<dyn ErasedCoreMemory>.
Required Methods§
fn blocks_erased( &self, ) -> Pin<Box<dyn Future<Output = Result<Vec<CoreMemoryBlock>>> + Send + '_>>
fn get_block_erased<'a>( &'a self, label: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<CoreMemoryBlock>>> + Send + 'a>>
fn put_block_erased( &self, block: CoreMemoryBlock, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>
fn append_block_erased<'a>( &'a self, label: &'a str, text: &'a str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn remove_block_erased<'a>( &'a self, label: &'a str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'a>>
fn render_erased( &self, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + '_>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".