pub struct ChainPathResolver<'a, R>(/* private fields */);Expand description
[PathAddressResolver] which uses the HOPR chain API to resolve addresses and channels.
This type implements a From trait for all types that implement both
ChainKeyOperations and ChainReadChannelOperations.
Trait Implementations§
Source§impl<R> Clone for ChainPathResolver<'_, R>
impl<R> Clone for ChainPathResolver<'_, R>
Source§impl<'a, R: ChainKeyOperations + ChainReadChannelOperations> From<&'a R> for ChainPathResolver<'a, R>
impl<'a, R: ChainKeyOperations + ChainReadChannelOperations> From<&'a R> for ChainPathResolver<'a, R>
Source§impl<'c, R: ChainKeyOperations + ChainReadChannelOperations + Sync> PathAddressResolver for ChainPathResolver<'c, R>
impl<'c, R: ChainKeyOperations + ChainReadChannelOperations + Sync> PathAddressResolver for ChainPathResolver<'c, R>
Source§fn resolve_transport_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<OffchainPublicKey>, PathError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_transport_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<OffchainPublicKey>, PathError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve
OffchainPublicKey from the given AddressSource§fn resolve_chain_address<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Result<Option<Address>, PathError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_chain_address<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Result<Option<Address>, PathError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve
Address from the given OffchainPublicKeySource§fn get_channel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 Address,
dst: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, PathError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_channel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 Address,
dst: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, PathError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
impl<R> Copy for ChainPathResolver<'_, R>
Auto Trait Implementations§
impl<'a, R> Freeze for ChainPathResolver<'a, R>
impl<'a, R> RefUnwindSafe for ChainPathResolver<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for ChainPathResolver<'a, R>where
R: Sync,
impl<'a, R> Sync for ChainPathResolver<'a, R>where
R: Sync,
impl<'a, R> Unpin for ChainPathResolver<'a, R>
impl<'a, R> UnwindSafe for ChainPathResolver<'a, R>where
R: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more