Enum backtalk::Method [] [src]

pub enum Method {
    List,
    Get,
    Delete,
    Post,
    Patch,
    Listen,
    Action(String),
}

A type of request, for instance "List" or "Post".

These mostly correspond to the HTTP methods, with the addition of List, Listen, and Action.

  • List is a GET request with an ID on a resource, such as GET /cats.
  • Listen is a GET request with a Accept: text/event-stream header. Listen requests may or may not have IDs, so both GET /cats and GET /cats/123 with the event-stream header would be a Listen request.
  • Action is a custom action on a specific resource ID. For instance, POST /cats/123/feed would be Action("feed").

Note that we don't support PUT requests currently, for simplicity.

Variants

GET /resource, indempotent

GET /resource/123, indempotent

DELETE /resource/123, indempotent

POST /resource

PATCH /resource/123

Either GET /resource/ or GET /resource/123, with the Accept: text/event-stream header

POST /resource/123/actionname

Methods

impl Method
[src]

Trait Implementations

impl Debug for Method
[src]

Formats the value using the given formatter.

impl Clone for Method
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Method
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Method
[src]