Skip to main content

GetArgs

Struct GetArgs 

Source
pub struct GetArgs {
    pub uri: String,
    pub output: PathBuf,
    pub jobs: Option<usize>,
    pub max_lane_streams: Option<u16>,
    pub include: Vec<String>,
    pub exclude: Vec<String>,
    pub select: bool,
    pub overwrite: bool,
    pub dry_run: bool,
    pub json: bool,
    pub common: ClientFetchArgs,
}
Expand description

decdn get — pull what a decdn: URI names over the paid cdn/client/v1 path.

  • decdn:<hash>: the raw blob. -o is the destination file, or - for stdout.
  • decdn:<hash>/: every entry of the bundle whose manifest has this hash. -o is the output directory.
  • decdn:<hash>/<path>: that one bundle entry. -o is the output directory, and the file lands at <OUT>/<path>.

A ?ns=<id> in the URI is the namespace routing hint (ADR 002) for every request of the run: the manifest blob and each entry. The bundle-only flags are an error on a blob URI, and the entry filters (--include, --exclude, --select) are an error on an entry URI.

Fields§

§uri: String

The decdn: URI to pull: decdn:<hash>[/<path>][?ns=<id>].

§output: PathBuf

The destination. For a blob URI, the file to write (atomically: temp in the same directory, then rename), or - to stream verified bytes to stdout. For a bundle or entry URI, the output directory (created if absent); each entry’s relative path resolves within it, and ../absolute/escaping paths are rejected.

§jobs: Option<usize>

Bundle only: maximum concurrent entry fetches across the whole run [default: 4]. Each distinct blob is one unit of work holding one slot: a plain whole-file entry, or a range-dedup entry across its complement drive, donor splice, and any re-fetch. A range-dedup entry that only waits for a sibling to finish the chunks it splices gives its slot to a queued entry until then. A byte range a sibling entry already holds is spliced from disk, not fetched, so it never takes a slot of its own.

§max_lane_streams: Option<u16>

Bundle only: maximum concurrent streams to one (pool, signer, provider) lane [default: 4]. Same-lane streams share one cumulative voucher watermark, and the serving node credits each stream’s delivered bytes from that shared lane fairly (a slow stream is paid from the headroom a faster sibling opened), so same-lane concurrency is safe and this only bounds how many streams touch one provider at once. Cross-lane parallelism (distinct providers) is bounded by --jobs regardless.

One connection per node carries every stream of the command, so the bound (1 to 64) stays below the node’s limit of concurrent streams on one connection.

§include: Vec<String>

Whole-bundle only: pull only entries whose POSIX relative path matches one of these globs (models/*.bin), matched against the manifest’s path field, never the on-disk absolute path. Repeatable: an entry passes the include gate if it matches any one. Absent => every entry passes the gate. gitignore semantics: * does not cross /, ** recurses.

§exclude: Vec<String>

Whole-bundle only: skip entries whose POSIX relative path matches one of these globs, matched against the manifest’s path field. Repeatable: every pattern is OR-ed. --exclude wins over --include: an entry matching both is skipped. Same gitignore glob semantics as --include.

§select: bool

Whole-bundle only: choose which files to pull interactively. Opens the (post---include/--exclude) file list in $VISUAL/$EDITOR, one path per line. Comment out (prefix #) or delete any line to skip that file; save and exit to pull the rest. Requires an interactive terminal; incompatible with --json and --dry-run.

§overwrite: bool

Bundle only: re-fetch and overwrite entries whose destination file already exists. Default is skip-existing (resume-friendly): a path skips when its saved .decdn-manifest.json record still matches the file’s hash, size, and mtime — the fast path, which trusts that gate without re-hashing — or, failing that, when re-hashing its on-disk bytes matches the manifest. A file byte-identical to one already anywhere else in the output root is likewise reused with no download: it is linked (or copied) from that on-disk file once its hash is confirmed by a re-hash. Use --overwrite to force a full re-fetch of every entry, for example when the output directory may have been modified outside decdn (an in-place edit that keeps a file’s size and mtime is otherwise trusted by the fast path). It skips consulting .decdn-manifest.json for skip decisions, so it disables both the skip-existing path and the whole-root reuse above; the file is still read and rewritten with the run’s results. It also fetches the manifest again instead of reading the output root’s cached copy.

§dry_run: bool

Bundle only: print the entries the run would pull (paths + sizes, after the entry filters; files already present are still listed) and exit without any network or chain activity. Entries are listed only when an earlier pull into the same output directory cached the bundle manifest.

§json: bool

Bundle only: emit a one-line JSON summary instead of human-readable output.

§common: ClientFetchArgs

Retrieval flags: peer discovery, chain and payment-pool coordinates, the source cap and the give-up limit.

Trait Implementations§

Source§

impl Args for GetArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for GetArgs

Source§

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

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for GetArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

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