Skip to main content

ExecutableBuilder

Trait ExecutableBuilder 

Source
pub trait ExecutableBuilder<S: Sync, Req, Resp>: Sized {
    // Required methods
    fn build(self) -> Req;
    async fn execute(self, service: &S) -> SDKResult<Resp>;

    // Provided method
    async fn execute_with_options(
        self,
        service: &S,
        _option: RequestOption,
    ) -> SDKResult<Resp> { ... }
}
Expand description

Builder 可执行抽象

Required Methods§

Source

fn build(self) -> Req

构建请求

Source

async fn execute(self, service: &S) -> SDKResult<Resp>

执行请求(默认不带 option)

Provided Methods§

Source

async fn execute_with_options( self, service: &S, _option: RequestOption, ) -> SDKResult<Resp>

执行请求(可选传入 RequestOption)

默认实现退化为 execute,以兼容仅实现基础 execute 的场景。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§