[−][src]Trait interledger_service::OutgoingService
Core service trait for sending OutgoingRequests that asynchronously returns an ILP Fulfill or Reject packet.
Associated Types
Loading content...Required methods
fn send_request(&mut self, request: OutgoingRequest<A>) -> Self::Future
Provided methods
fn wrap<F, R>(self, f: F) -> WrappedService<F, Self, A> where
F: Fn(OutgoingRequest<A>, Self) -> R,
R: Future<Item = Fulfill, Error = Reject> + Send + 'static,
Self: Clone + Sized,
F: Fn(OutgoingRequest<A>, Self) -> R,
R: Future<Item = Fulfill, Error = Reject> + Send + 'static,
Self: Clone + Sized,
Wrap the given service such that the provided function will be called to handle each request. That function can return immediately, modify the request before passing it on, and/or handle the result of calling the inner service.
Implementors
impl<F, A, B> OutgoingService<A> for ServiceFn<F, A> where
A: Account,
B: IntoFuture<Item = Fulfill, Error = Reject>,
<B as IntoFuture>::Future: Send + 'static,
F: FnMut(OutgoingRequest<A>) -> B,
[src]
A: Account,
B: IntoFuture<Item = Fulfill, Error = Reject>,
<B as IntoFuture>::Future: Send + 'static,
F: FnMut(OutgoingRequest<A>) -> B,
type Future = BoxedIlpFuture
fn send_request(&mut self, request: OutgoingRequest<A>) -> Self::Future
[src]
impl<F, IO, A, R> OutgoingService<A> for WrappedService<F, IO, A> where
F: Fn(OutgoingRequest<A>, IO) -> R,
IO: OutgoingService<A> + Clone,
A: Account,
R: Future<Item = Fulfill, Error = Reject> + Send + 'static,
[src]
F: Fn(OutgoingRequest<A>, IO) -> R,
IO: OutgoingService<A> + Clone,
A: Account,
R: Future<Item = Fulfill, Error = Reject> + Send + 'static,