openwhisk_rust/api/
traits.rs

1use serde_json::Value;
2
3use super::HttpMethods;
4
5pub trait Service {
6    type Output;
7    fn new_request(
8        &self,
9        method: Option<HttpMethods>,
10        url: &str,
11        user_auth: Option<(&str, &str)>,
12        body: Option<Value>,
13    ) -> Result<Self::Output, String>;
14    fn invoke_request(&self, request: Self::Output) -> Result<Value, String>;
15}