pub struct MempoolSelection {
pub base_url: String,
pub network: BitcoinNetwork,
pub source: MempoolConfigSource,
}Expand description
The resolved mempool endpoint: which URL, which chain, and why.
Produced by select_mempool_endpoint /
select_mempool_endpoint_from_env and carried on MempoolHttpClient so
the choice can be logged at startup (log_mempool_selection) and surfaced
in a manifest (MempoolSelection::to_manifest_json).
Fields§
§base_url: StringThe base URL actually in use, trailing slash trimmed.
network: BitcoinNetworkThe Bitcoin network inferred from base_url.
source: MempoolConfigSourceWhether base_url was operator-supplied or the built-in default.
Implementations§
Source§impl MempoolSelection
impl MempoolSelection
Sourcepub fn to_manifest_json(&self) -> Value
pub fn to_manifest_json(&self) -> Value
Render the selection as manifest JSON:
{"base_url": …, "network": …, "source": "explicit"|"default"}.
Trait Implementations§
Source§impl Clone for MempoolSelection
impl Clone for MempoolSelection
Source§fn clone(&self) -> MempoolSelection
fn clone(&self) -> MempoolSelection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MempoolSelection
impl Debug for MempoolSelection
impl Eq for MempoolSelection
Source§impl PartialEq for MempoolSelection
impl PartialEq for MempoolSelection
impl StructuralPartialEq for MempoolSelection
Auto Trait Implementations§
impl Freeze for MempoolSelection
impl RefUnwindSafe for MempoolSelection
impl Send for MempoolSelection
impl Sync for MempoolSelection
impl Unpin for MempoolSelection
impl UnsafeUnpin for MempoolSelection
impl UnwindSafe for MempoolSelection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.