Trait ToEndpoint

Source
pub trait ToEndpoint: Serialize {
    // Required method
    fn to_endpoint(&self) -> String;

    // Provided method
    fn to_endpoint_url(&self) -> Url { ... }
}
Expand description

Trait for getting the JSON API endpoint specific to the partner account being used for the service

Required Methods§

Source

fn to_endpoint(&self) -> String

Generate a string describing the API endpoint to be used.

Provided Methods§

Source

fn to_endpoint_url(&self) -> Url

Generate a url::Url for the API endpoint to be used.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToEndpoint for String

Source§

fn to_endpoint(&self) -> String

Generate a string describing the API endpoint to be used.

Implementors§