Skip to main content

bitwarden_ipc/rpc/
request.rs

1use serde::{Serialize, de::DeserializeOwned};
2
3/// Trait representing an RPC request.
4pub trait RpcRequest: Serialize + DeserializeOwned + 'static {
5    /// The type of the response that will be returned for this request.
6    type Response: Serialize + DeserializeOwned + 'static;
7
8    /// Used to identify handlers. This should be unique across all request types.
9    const NAME: &str;
10}