Trait restson::RestPath [] [src]

pub trait RestPath<T> {
    fn get_path(par: T) -> Result<String, Error>;
}

Rest path builder trait for type.

Provides implementation for rest_path function that builds type (and REST endpoint) specific API path from given parameter(s). The built REST path is appended to the base URL given to RestClient. If Err is returned, it is propagated directly to API caller.

Required Methods

Construct type specific REST API path from given parameters (e.g. "api/devices/1234").

Implementors