pub trait ChainReadChannelOperations {
type Error: Error + Send + Sync + 'static;
// Required methods
fn me(&self) -> &Address;
fn channel_by_parties<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 Address,
dst: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn channel_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
channel_id: &'life1 ChannelId,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn stream_channels<'a, 'async_trait>(
&'a self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'a, ChannelEntry>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
}
Expand description
On-chain read operations regarding channels.
Required Associated Types§
Required Methods§
Sourcefn channel_by_parties<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 Address,
dst: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn channel_by_parties<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 Address,
dst: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns a single channel given src
and dst
.
Sourcefn channel_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
channel_id: &'life1 ChannelId,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn channel_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
channel_id: &'life1 ChannelId,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a single channel given channel_id
.
Sourcefn stream_channels<'a, 'async_trait>(
&'a self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'a, ChannelEntry>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn stream_channels<'a, 'async_trait>(
&'a self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'a, ChannelEntry>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Returns a stream of channels given the ChannelSelector
.