Skip to main content

BundlePullerBuilder

Struct BundlePullerBuilder 

Source
pub struct BundlePullerBuilder { /* private fields */ }
Expand description

Implementations§

Source§

impl BundlePullerBuilder

Source

pub fn relays(self, relays: Vec<RelayUrl>) -> Self

The relays to hint when dialing a node. The first one rides each dial.

Source

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.

Source

pub const fn jobs(self, jobs: usize) -> Self

How many blobs fetch at once (at least 1; 4 by default).

Source

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).

Source

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.

Source

pub const fn max_blob_bytes(self, bytes: u64) -> Self

The largest blob one entry fetches (1 TiB by default).

Source

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.

Source

pub fn observer(self, observer: Arc<dyn BundleObserver>) -> Self

Where the pull reports its progress. None by default.

Source

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).

Source

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§

Source§

impl Debug for BundlePullerBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more