Skip to main content

TxHandle

Trait TxHandle 

Source
pub trait TxHandle: Send {
    // Required methods
    fn as_any(&mut self) -> &mut (dyn Any + Send);
    fn into_any(self: Box<Self>) -> Box<dyn Any + Send>;
}
Expand description

A caller-owned store transaction. Adapters downcast to their own concrete handle via as_any and reject a foreign one — the compile-time path (transactional API) is generic and never hits this; the dyn path needs the runtime check.

Required Methods§

Source

fn as_any(&mut self) -> &mut (dyn Any + Send)

Source

fn into_any(self: Box<Self>) -> Box<dyn Any + Send>

Consuming downcast, for commit/rollback which take the handle by value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§