open_lark/core/trait_system/
executable_builder.rs1use async_trait::async_trait;
16
17#[async_trait]
18pub trait ExecutableBuilder<TService, TRequest, TResponse>
19where
20 TService: Send + Sync,
21 TRequest: Send + Sync,
22 TResponse: Send + Sync,
23{
24 fn build(self) -> TRequest;
26
27 async fn execute(self, service: &TService) -> crate::core::SDKResult<TResponse>
29 where
30 Self: Sized;
31
32 async fn execute_with_options(
34 self,
35 service: &TService,
36 option: crate::core::req_option::RequestOption,
37 ) -> crate::core::SDKResult<TResponse>
38 where
39 Self: Sized;
40}