Struct annis::Client [−][src]
pub struct Client { pub token: String, }
A client to make request with Service.
Examples
let client = Client::set_token("access_token"); let res = client.call(annis::works())?;
Fields
token: String
Methods
impl Client
[src]
impl Client
pub fn set_token<T>(access_token: T) -> Self where
T: Into<String>,
[src]
pub fn set_token<T>(access_token: T) -> Self where
T: Into<String>,
pub fn call<K: Into<String> + PartialEq>(
&self,
service: Service<K>
) -> Result<Value, String> where
K: Serialize,
[src]
pub fn call<K: Into<String> + PartialEq>(
&self,
service: Service<K>
) -> Result<Value, String> where
K: Serialize,
Trait Implementations
impl Debug for Client
[src]
impl Debug for Client
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Client
[src]
impl Clone for Client