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.-ois the destination file, or-for stdout.decdn:<hash>/: every entry of the bundle whose manifest has this hash.-ois the output directory.decdn:<hash>/<path>: that one bundle entry.-ois 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: StringThe decdn: URI to pull: decdn:<hash>[/<path>][?ns=<id>].
output: PathBufThe 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: boolWhole-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: boolBundle 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: boolBundle 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: boolBundle only: emit a one-line JSON summary instead of human-readable output.
common: ClientFetchArgsRetrieval flags: peer discovery, chain and payment-pool coordinates, the source cap and the give-up limit.
Trait Implementations§
Source§impl Args for GetArgs
impl Args for GetArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for GetArgs
impl FromArgMatches for GetArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for GetArgs
impl RefUnwindSafe for GetArgs
impl Send for GetArgs
impl Sync for GetArgs
impl Unpin for GetArgs
impl UnsafeUnpin for GetArgs
impl UnwindSafe for GetArgs
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