mangadex_api_schema_rust

Trait Endpoint

Source
pub trait Endpoint {
    type Query: Serialize;
    type Body: Serialize;
    type Response: FromResponse;

    // Required method
    fn path(&self) -> Cow<'_, str>;

    // Provided methods
    fn method(&self) -> Method { ... }
    fn require_auth(&self) -> bool { ... }
    fn query(&self) -> Option<&Self::Query> { ... }
    fn body(&self) -> Option<&Self::Body> { ... }
    fn multipart(&self) -> Option<Form> { ... }
}

Required Associated Types§

Required Methods§

Source

fn path(&self) -> Cow<'_, str>

Provided Methods§

Source

fn method(&self) -> Method

Source

fn require_auth(&self) -> bool

Source

fn query(&self) -> Option<&Self::Query>

Source

fn body(&self) -> Option<&Self::Body>

Source

fn multipart(&self) -> Option<Form>

Implementors§