cuprate_blockchain/service/
types.rs

1//! Database service type aliases.
2
3//---------------------------------------------------------------------------------------------------- Use
4use cuprate_database::DbResult;
5use cuprate_database_service::{DatabaseReadService, DatabaseWriteHandle};
6use cuprate_types::blockchain::{
7    BlockchainReadRequest, BlockchainResponse, BlockchainWriteRequest,
8};
9
10//---------------------------------------------------------------------------------------------------- Types
11/// The actual type of the response.
12///
13/// Either our [`BlockchainResponse`], or a database error occurred.
14pub(super) type ResponseResult = DbResult<BlockchainResponse>;
15
16/// The blockchain database write service.
17pub type BlockchainWriteHandle = DatabaseWriteHandle<BlockchainWriteRequest, BlockchainResponse>;
18
19/// The blockchain database read service.
20pub type BlockchainReadHandle = DatabaseReadService<BlockchainReadRequest, BlockchainResponse>;