Skip to main content

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 a generic 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 hostname for the client’s target instance.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§