MoveableBindCollector

Trait MoveableBindCollector 

Source
pub trait MoveableBindCollector<DB: TypeMetadata> {
    type BindData: Send + 'static;

    // Required methods
    fn moveable(&self) -> Self::BindData;
    fn append_bind_data(&mut self, from: &Self::BindData);
    fn push_debug_binds<'a, 'b>(
        bind_data: &Self::BindData,
        f: &'a mut Vec<Box<dyn Debug + 'b>>,
    );
}
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Expand description

A movable version of the bind collector which allows it to be extracted, moved and refilled.

This is mostly useful in async context where bind data needs to be moved across threads.

Required Associated Types§

Source

type BindData: Send + 'static

The movable bind data of this bind collector

Required Methods§

Source

fn moveable(&self) -> Self::BindData

Builds a movable version of the bind collector

Source

fn append_bind_data(&mut self, from: &Self::BindData)

Refill the bind collector with its bind data

Source

fn push_debug_binds<'a, 'b>( bind_data: &Self::BindData, f: &'a mut Vec<Box<dyn Debug + 'b>>, )

Push bind data as debug representation

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<DB> MoveableBindCollector<DB> for RawBytesBindCollector<DB>
where for<'a> DB: Backend<BindCollector<'a> = Self> + TypeMetadata + 'static, <DB as TypeMetadata>::TypeMetadata: Debug + Clone + Send,