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<T> AnySync for T
impl<T> AnySync for T
§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,
§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> 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> ⓘ
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> ⓘ
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 moreSource§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