Struct crud_api_endpoint::ApiRun
source · pub struct ApiRun {
pub infos: ApiInformation,
/* private fields */
}Expand description
Attribute used by #[derive(ApiRun)].
It declare a new cli application:
- create the cli
- handle the command
It can take parameters by #[api(...)].
Only one #[derive(ApiRun)] should be present in your application.
Fields§
§infos: ApiInformationInformation block of the application.
Example
#[api(infos(
base_url = "http://jsonplaceholder.typicode.com",
name = "jsonplaceholder",
qualifier = "com",
organisation = "typicode",
env_prefix = "JSONPLACEHOLDER"
))]
Trait Implementations§
source§impl FromDeriveInput for ApiRun
impl FromDeriveInput for ApiRun
source§fn from_derive_input(__di: &DeriveInput) -> Result<Self>
fn from_derive_input(__di: &DeriveInput) -> Result<Self>
Create an instance from
syn::DeriveInput, or return an error.