[−][src]Struct interledger_service_util::ValidatorService
Validator Service
Incoming or Outgoing Service responsible for rejecting timed out
requests and checking that fulfillments received match the execution_condition
from the original Prepare
packets.
Forwards everything else.
Methods
impl<I, S, A> ValidatorService<I, S, A> where
I: IncomingService<A>,
S: AddressStore,
A: Account,
[src]
I: IncomingService<A>,
S: AddressStore,
A: Account,
impl<O, S, A> ValidatorService<O, S, A> where
O: OutgoingService<A>,
S: AddressStore,
A: Account,
[src]
O: OutgoingService<A>,
S: AddressStore,
A: Account,
Trait Implementations
impl<IO: Clone, S: Clone, A: Clone> Clone for ValidatorService<IO, S, A>
[src]
fn clone(&self) -> ValidatorService<IO, S, A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<I, S, A> IncomingService<A> for ValidatorService<I, S, A> where
I: IncomingService<A>,
S: AddressStore,
A: Account,
[src]
I: IncomingService<A>,
S: AddressStore,
A: Account,
type Future = BoxedIlpFuture
fn handle_request(&mut self, request: IncomingRequest<A>) -> Self::Future
[src]
On receiving a request:
- If the prepare packet in the request is not expired, forward it, otherwise return a reject
impl<O, S, A> OutgoingService<A> for ValidatorService<O, S, A> where
O: OutgoingService<A>,
S: AddressStore,
A: Account,
[src]
O: OutgoingService<A>,
S: AddressStore,
A: Account,
type Future = BoxedIlpFuture
fn send_request(&mut self, request: OutgoingRequest<A>) -> Self::Future
[src]
On sending a request:
- If the outgoing packet has expired, return a reject with the appropriate ErrorCode
- Tries to forward the request
- If no response is received before the prepare packet's expiration, it assumes that the outgoing request has timed out.
- If no timeout occurred, but still errored it will just return the reject
- If the forwarding is successful, it should receive a fulfill packet. Depending on if the hash of the fulfillment condition inside the fulfill is a preimage of the condition of the prepare:
- return the fulfill if it matches
- otherwise reject
Auto Trait Implementations
impl<IO, S, A> Send for ValidatorService<IO, S, A> where
A: Send,
IO: Send,
S: Send,
A: Send,
IO: Send,
S: Send,
impl<IO, S, A> Sync for ValidatorService<IO, S, A> where
A: Sync,
IO: Sync,
S: Sync,
A: Sync,
IO: Sync,
S: Sync,
impl<IO, S, A> Unpin for ValidatorService<IO, S, A> where
A: Unpin,
IO: Unpin,
S: Unpin,
A: Unpin,
IO: Unpin,
S: Unpin,
impl<IO, S, A> UnwindSafe for ValidatorService<IO, S, A> where
A: UnwindSafe,
IO: UnwindSafe,
S: UnwindSafe,
A: UnwindSafe,
IO: UnwindSafe,
S: UnwindSafe,
impl<IO, S, A> RefUnwindSafe for ValidatorService<IO, S, A> where
A: RefUnwindSafe,
IO: RefUnwindSafe,
S: RefUnwindSafe,
A: RefUnwindSafe,
IO: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,