Struct backtalk::memory::MemoryAdapter
[−]
[src]
pub struct MemoryAdapter { /* fields omitted */ }
Methods
impl MemoryAdapter
[src]
fn new() -> MemoryAdapter
Trait Implementations
impl Adapter for MemoryAdapter
[src]
fn list(
&self,
params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
&self,
params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
currently this function only supports equality matching — we'd probably want to add more kinds of matching and querying in the future, maybe by building into query object
fn get(
&self,
id: &str,
_params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
&self,
id: &str,
_params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
fn post(
&self,
data: &JsonObject,
_params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
&self,
data: &JsonObject,
_params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
fn patch(
&self,
id: &str,
data: &JsonObject,
_params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
&self,
id: &str,
data: &JsonObject,
_params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
fn delete(
&self,
id: &str,
_params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
&self,
id: &str,
_params: &JsonObject
) -> BoxFuture<JsonObject, (ErrorKind, JsonValue)>
fn handle(&self, req: Request) -> BoxFuture<Reply, Error>
Takes a Request
, passes it to the appropriate function, and turns the response into a proper Reply
future. If you're using an Adapter
in your webapp, this is the function you want to call. Read more