Skip to main content

openlark_core/api/
traits.rs

1//! API特征定义 - 独立版本
2#![allow(async_fn_in_trait)]
3
4pub use super::responses::RawResponse;
5use super::ApiRequest;
6use crate::error::SDKResult;
7
8/// 异步API客户端特征
9pub trait AsyncApiClient: Send + Sync {
10    async fn execute_raw(&self, request: ApiRequest<()>) -> SDKResult<RawResponse>;
11}
12
13/// 同步API客户端特征
14pub trait SyncApiClient: Send + Sync {
15    fn execute_raw(&self, request: ApiRequest<()>) -> SDKResult<RawResponse>;
16}