Trait Api

Source
pub trait Api {
    type Request: Serialize + Debug;
    type Response: for<'a> Deserialize<'a> + Debug;

    const VERSION: &'static str;
    const ACTION: &'static str;
    const SERVICE: &'static str;
    const HOST: &'static str;
}
Expand description

tencentcloud api

the Api define an api request type, response type and other info

Required Associated Constants§

Source

const VERSION: &'static str

the api version, format is 2018-3-21

Source

const ACTION: &'static str

the api action, for example: the tmt text translate is TextTranslate

Source

const SERVICE: &'static str

the api service, for example: the tmt text translate is tmt

Source

const HOST: &'static str

the api host, for example: the tmt text translate is tmt.tencentcloudapi.com

Required Associated Types§

Source

type Request: Serialize + Debug

the api request type

Source

type Response: for<'a> Deserialize<'a> + Debug

the api response type

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§