Struct UtxoFuture
pub struct UtxoFuture { /* private fields */ }
Expand description
Represents a future resolution of a UtxoLookup::get_utxo
query resolving async.
See UtxoResult::Async
and UtxoFuture::resolve
for more info.
Implementations§
§impl UtxoFuture
impl UtxoFuture
pub fn new() -> UtxoFuture
pub fn new() -> UtxoFuture
Builds a new future for later resolution.
pub fn resolve_without_forwarding<L>(
&self,
graph: &NetworkGraph<L>,
result: Result<TxOut, UtxoLookupError>,
)
pub fn resolve_without_forwarding<L>( &self, graph: &NetworkGraph<L>, result: Result<TxOut, UtxoLookupError>, )
Resolves this future against the given graph
and with the given result
.
This is identical to calling UtxoFuture::resolve
with a dummy gossip
, disabling
forwarding the validated gossip message onwards to peers.
Because this may cause the NetworkGraph
’s processing_queue_high
to flip, in order
to allow us to interact with peers again, you should call PeerManager::process_events
after this.
pub fn resolve<L, G, U, GS>(
&self,
graph: &NetworkGraph<L>,
gossip: GS,
result: Result<TxOut, UtxoLookupError>,
)where
L: Deref,
G: Deref<Target = NetworkGraph<L>>,
U: Deref,
GS: Deref<Target = P2PGossipSync<G, U, L>>,
<L as Deref>::Target: Logger,
<U as Deref>::Target: UtxoLookup,
pub fn resolve<L, G, U, GS>(
&self,
graph: &NetworkGraph<L>,
gossip: GS,
result: Result<TxOut, UtxoLookupError>,
)where
L: Deref,
G: Deref<Target = NetworkGraph<L>>,
U: Deref,
GS: Deref<Target = P2PGossipSync<G, U, L>>,
<L as Deref>::Target: Logger,
<U as Deref>::Target: UtxoLookup,
Resolves this future against the given graph
and with the given result
.
The given gossip
is used to broadcast any validated messages onwards to all peers which
have available buffer space.
Because this may cause the NetworkGraph
’s processing_queue_high
to flip, in order
to allow us to interact with peers again, you should call PeerManager::process_events
after this.
Trait Implementations§
§impl Clone for UtxoFuture
impl Clone for UtxoFuture
§fn clone(&self) -> UtxoFuture
fn clone(&self) -> UtxoFuture
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for UtxoFuture
impl RefUnwindSafe for UtxoFuture
impl Send for UtxoFuture
impl Sync for UtxoFuture
impl Unpin for UtxoFuture
impl UnwindSafe for UtxoFuture
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request