openlark-core 0.15.0

OpenLark 核心基础设施 crate - HTTP 客户端、错误处理、认证和核心工具
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! API特征定义 - 独立版本
#![allow(async_fn_in_trait)]

pub use super::responses::RawResponse;
use super::ApiRequest;
use crate::error::SDKResult;

/// 异步API客户端特征
pub trait AsyncApiClient: Send + Sync {
    /// 执行原始 API 请求
    async fn execute_raw(&self, request: ApiRequest<()>) -> SDKResult<RawResponse>;
}

/// 同步API客户端特征
pub trait SyncApiClient: Send + Sync {
    /// 执行原始 API 请求
    fn execute_raw(&self, request: ApiRequest<()>) -> SDKResult<RawResponse>;
}