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 aGET
request with an ID on a resource, such asGET /cats
.Listen
is aGET
request with aAccept: text/event-stream
header.Listen
requests may or may not have IDs, so bothGET /cats
andGET /cats/123
with theevent-stream
header would be aListen
request.Action
is a custom action on a specific resource ID. For instance,POST /cats/123/feed
would beAction("feed")
.
Note that we don't support PUT
requests currently, for simplicity.
Variants
List
GET /resource
, indempotent
Get
GET /resource/123
, indempotent
Delete
DELETE /resource/123
, indempotent
Post
POST /resource
Patch
PATCH /resource/123
Listen
Either GET /resource/
or GET /resource/123
, with the Accept: text/event-stream
header
Action(String)
POST /resource/123/actionname
Methods
impl Method
[src]
Trait Implementations
impl Debug for Method
[src]
impl Clone for Method
[src]
fn clone(&self) -> Method
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Method
[src]
fn eq(&self, __arg_0: &Method) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Method) -> bool
This method tests for !=
.