pub struct BundlePullerBuilder { /* private fields */ }Expand description
Builds a BundlePuller (BundlePuller::builder).
Implementations§
Source§impl BundlePullerBuilder
impl BundlePullerBuilder
Sourcepub fn relays(self, relays: Vec<RelayUrl>) -> Self
pub fn relays(self, relays: Vec<RelayUrl>) -> Self
The relays to hint when dialing a node. The first one rides each dial.
Sourcepub const fn namespace(self, namespace: Option<u64>) -> Self
pub const fn namespace(self, namespace: Option<u64>) -> Self
The namespace (ADR 002) every request carries: a node routes a cache
miss to that namespace’s origins. None is the best-effort default.
Sourcepub const fn jobs(self, jobs: usize) -> Self
pub const fn jobs(self, jobs: usize) -> Self
How many blobs fetch at once (at least 1; 4 by default).
Sourcepub const fn max_lane_streams(self, n: usize) -> Self
pub const fn max_lane_streams(self, n: usize) -> Self
How many streams one provider’s lane runs at once across the whole pull (at least 1; 4 by default).
Sourcepub const fn max_rate_per_mb(self, rate: u64) -> Self
pub const fn max_rate_per_mb(self, rate: u64) -> Self
The highest per-MB rate a lane accepts; 0, the default, sets no
ceiling.
Sourcepub const fn max_blob_bytes(self, bytes: u64) -> Self
pub const fn max_blob_bytes(self, bytes: u64) -> Self
The largest blob one entry fetches (1 TiB by default).
Sourcepub const fn stop(
self,
interactive: bool,
give_up_after: Option<Duration>,
) -> Self
pub const fn stop( self, interactive: bool, give_up_after: Option<Duration>, ) -> Self
When the pull gives up after making no progress
(crate::StopPolicy): an interactive pull waits for its caller to
cancel, and any other stops after 10 minutes. give_up_after
overrides both. Non-interactive by default.
Sourcepub fn observer(self, observer: Arc<dyn BundleObserver>) -> Self
pub fn observer(self, observer: Arc<dyn BundleObserver>) -> Self
Where the pull reports its progress. None by default.
Sourcepub fn unconfirmed_escrows(self, escrows: UnconfirmedEscrows) -> Self
pub fn unconfirmed_escrows(self, escrows: UnconfirmedEscrows) -> Self
Where the pull holds each openPool and topUp that no local record
credits yet (UnconfirmedEscrows::pending), across every pass. A
cancel or a fault that ends the pull can drop a receipt wait, and the
transaction may still escrow. A pull that is not interrupted ends
BundleEnd::Stopped on each one, and the caller keeps a clone to
name what is left on BundleEnd::Interrupted. A topUp the handle
holds also refuses every later topUp of the pull, across passes. The
handle also holds each openPool and topUp that escrowed with no
local record crediting it (UnconfirmedEscrows::untracked). It
refuses every later openPool and topUp, ends every later pull on
the handle BundleEnd::Stopped, and is the caller’s to name on
BundleEnd::Interrupted. A private handle by default
(BundlePuller::unconfirmed_escrows).
Sourcepub async fn build(self) -> Result<BundlePuller>
pub async fn build(self) -> Result<BundlePuller>
Build the puller: connect to the RPC endpoint and read the pool’s settlement token.
§Errors
The RPC URL is malformed, the capability does not decode, the buyer
store cannot read or record its lane salt (a self-owned run), or the
PaymentPool token read fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BundlePullerBuilder
impl !UnwindSafe for BundlePullerBuilder
impl Freeze for BundlePullerBuilder
impl Send for BundlePullerBuilder
impl Sync for BundlePullerBuilder
impl Unpin for BundlePullerBuilder
impl UnsafeUnpin for BundlePullerBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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 more