[−][src]Trait exonum_api::ApiBackend
This trait is used to implement an API backend for Exonum.
Associated Types
Loading content...Required methods
fn raw_handler(&mut self, handler: Self::Handler) -> &mut Self
Add the raw endpoint handler for the given backend.
fn wire(&self, output: Self::Backend) -> Self::Backend
Bind API handlers to the given backend.
Provided methods
fn endpoint<Q, I, R, F, E>(&mut self, name: &str, endpoint: E) -> &mut Self where
Q: DeserializeOwned + 'static,
I: Serialize + 'static,
F: Fn(Q) -> R + 'static + Clone,
E: Into<With<Q, I, R, F>>,
Self::Handler: From<NamedWith<Q, I, R, F>>,
Q: DeserializeOwned + 'static,
I: Serialize + 'static,
F: Fn(Q) -> R + 'static + Clone,
E: Into<With<Q, I, R, F>>,
Self::Handler: From<NamedWith<Q, I, R, F>>,
Adds the given endpoint handler to the backend.
fn endpoint_mut<Q, I, R, F, E>(&mut self, name: &str, endpoint: E) -> &mut Self where
Q: DeserializeOwned + 'static,
I: Serialize + 'static,
F: Fn(Q) -> R + 'static + Clone,
E: Into<With<Q, I, R, F>>,
Self::Handler: From<NamedWith<Q, I, R, F>>,
Q: DeserializeOwned + 'static,
I: Serialize + 'static,
F: Fn(Q) -> R + 'static + Clone,
E: Into<With<Q, I, R, F>>,
Self::Handler: From<NamedWith<Q, I, R, F>>,
Adds the given mutable endpoint handler to the backend.