[−][src]Struct interledger_btp::BtpOutgoingService
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]
O: OutgoingService<A> + Clone,
A: BtpAccount + 'static,
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]
I: IncomingService<A> + Clone + Send + 'static,
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]
A::AccountId: Clone,
fn clone(&self) -> BtpOutgoingService<O, A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<O, A> OutgoingService<A> for BtpOutgoingService<O, A> where
O: OutgoingService<A> + Clone,
A: BtpAccount + 'static,
[src]
O: OutgoingService<A> + Clone,
A: BtpAccount + 'static,
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,
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,
O: Sync,
<A as Account>::AccountId: Send + Sync,
impl<O, A> Unpin for BtpOutgoingService<O, A> where
O: Unpin,
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]
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,