RestClient

Trait RestClient 

Source
pub trait RestClient {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn rest_endpoint(
        &self,
        endpoint: &str,
    ) -> Result<Url, ApiError<Self::Error>>;
}
Expand description

A trait representing a client which can communicate with an OpenTalk instance via REST.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

The errors which may occur for this client.

Required Methods§

Source

fn rest_endpoint(&self, endpoint: &str) -> Result<Url, ApiError<Self::Error>>

Get the URL for the endpoint for the client.

This method adds the base url including hostname for the client’s target instance.

§Errors

The error that can be returned by the method will usually indicate that parsing the generated URL string into a Url failed.

Implementors§