Trait proxer::Endpoint
[−]
[src]
pub trait Endpoint { type Parameter: Serialize + Debug + Clone; type ResponseType: Debug + Clone + DeserializeOwned; const URL: &'static str; fn new(_: Client, _: Self::Parameter) -> Self; fn params_mut(&mut self) -> &mut Self::Parameter; fn client(&self) -> Client; fn url(&self) -> String; fn parse(&self, _: Value) -> Result<Self::ResponseType, Error>; }
Every struct that is an endpoint, implements this trait.
Associated Types
type Parameter: Serialize + Debug + Clone
type ResponseType: Debug + Clone + DeserializeOwned
Associated Constants
Required Methods
fn new(_: Client, _: Self::Parameter) -> Self
fn params_mut(&mut self) -> &mut Self::Parameter
fn client(&self) -> Client
fn url(&self) -> String
fn parse(&self, _: Value) -> Result<Self::ResponseType, Error>
Implementors
impl Endpoint for GetFullEntry type Parameter = InfoGetFullEntry; type ResponseType = Fullentry;
impl Endpoint for GetComments type Parameter = InfoGetComments; type ResponseType = Vec<Comment>;
impl Endpoint for Userinfo type Parameter = UserUserinfo; type ResponseType = Userinfo;