messaging_thread_pool 5.0.3

A library for aiding the creation of typed thread pool of objects that is communicated with via channels
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::fmt::Debug;

use crate::{pool_item::PoolItem, thread_request_response::ThreadRequestResponse};

/// This trait allows for the pairing of requests and responses.
///
/// Implementing this trait for the API's request/response pairs allows the messaging
/// infrastructure to guarantee the correctness of the messages sent and received
/// by leveraging the type system.
pub trait RequestWithResponse<P>: Debug + Into<ThreadRequestResponse<P>>
where
    P: PoolItem,
    Self::Response: Debug + From<ThreadRequestResponse<P>> + Into<ThreadRequestResponse<P>>,
{
    type Response;
}