[][src]Struct interledger_btp::BtpOutgoingService

pub struct BtpOutgoingService<O, A: Account> { /* fields omitted */ }

A container for BTP/WebSocket connections that implements OutgoingService for sending outgoing ILP Prepare packets over one of the connected BTP connections.

Methods

impl<O, A> BtpOutgoingService<O, A> where
    O: OutgoingService<A> + Clone,
    A: BtpAccount + 'static, 
[src]

pub fn new(ilp_address: Address, next: O) -> Self[src]

pub fn close(&self)[src]

Close all of the open WebSocket connections

pub fn handle_incoming<I>(self, incoming_handler: I) -> BtpService<I, O, A> where
    I: IncomingService<A> + Clone + Send + 'static, 
[src]

Convert this BtpOutgoingService into a bidirectional BtpService by adding a handler for incoming requests. This will automatically pull all incoming Prepare packets from the channel buffer and call the IncomingService with them.

Trait Implementations

impl<O: Clone, A: Clone + Account> Clone for BtpOutgoingService<O, A> where
    A::AccountId: Clone
[src]

impl<O, A> OutgoingService<A> for BtpOutgoingService<O, A> where
    O: OutgoingService<A> + Clone,
    A: BtpAccount + 'static, 
[src]

type Future = BoxedIlpFuture

fn send_request(&mut self, request: OutgoingRequest<A>) -> Self::Future[src]

Send an outgoing request to one of the open connections.

If there is no open connection for the Account specified in request.to, the request will be passed through to the next handler.

Auto Trait Implementations

impl<O, A> Send for BtpOutgoingService<O, A> where
    O: Send,
    <A as Account>::AccountId: Send + Sync

impl<O, A> Sync for BtpOutgoingService<O, A> where
    O: Sync,
    <A as Account>::AccountId: Send + Sync

impl<O, A> Unpin for BtpOutgoingService<O, A> where
    O: Unpin

impl<O, A> !UnwindSafe for BtpOutgoingService<O, A>

impl<O, A> !RefUnwindSafe for BtpOutgoingService<O, A>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Erased for T