Skip to main content

AnySocketExecutor

Trait AnySocketExecutor 

Source
pub trait AnySocketExecutor:
    AnyExt
    + Serialize
    + Deserialize {
    // Required method
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        handshake_cx: HandshakeCx,
        websocket: HyperWebsocket,
        db_conns: DbConns,
    ) -> Pin<Box<dyn Future<Output = Result<(), Infallible>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generic methods trait to handle requests to the endpoints.

Required Methods§

Source

fn execute<'life0, 'async_trait>( &'life0 self, handshake_cx: HandshakeCx, websocket: HyperWebsocket, db_conns: DbConns, ) -> Pin<Box<dyn Future<Output = Result<(), Infallible>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Executes a query using the given executor and database connection.

Trait Implementations§

Source§

impl<'typetag> Serialize for dyn AnySocketExecutor + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn AnySocketExecutor + Send + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn AnySocketExecutor + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn AnySocketExecutor + Send + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§