pub struct FetchArgs {Show 15 fields
pub urls: Vec<String>,
pub opml: Option<PathBuf>,
pub input: Option<PathBuf>,
pub format: FormatArg,
pub ndjson_records: bool,
pub content: ContentArg,
pub limit: Option<usize>,
pub max_content_chars: Option<usize>,
pub since: Option<String>,
pub concurrency: usize,
pub timeout: u64,
pub no_cache: bool,
pub max_age: Option<String>,
pub refresh: bool,
pub user_agent: Option<String>,
}Fields§
§urls: Vec<String>Feed URLs to fetch. Use - to read URLs from stdin (one per line).
opml: Option<PathBuf>Read feed URLs from an OPML file (uses each outline’s xmlUrl).
input: Option<PathBuf>Read feed URLs from a text file (one per line; # comments allowed).
format: FormatArgOutput format.
ndjson_records: boolWith --format ndjson, emit one tagged record per line
({"type":"item"|"error"|"summary", …}) instead of bare items, so feed-level errors
and aggregate totals stay in the stdout stream. No effect on other formats.
content: ContentArgContent extraction format for item bodies.
limit: Option<usize>Maximum items per feed (newest first).
max_content_chars: Option<usize>Truncate each item body to at most this many characters (flagged content_truncated
in the output). Useful to fetch many items while skipping giant bodies.
since: Option<String>Only include items at/after this time: a duration (e.g. 2h, 7d) or an
ISO-8601 date/datetime.
concurrency: usizeMax feeds fetched concurrently.
timeout: u64Per-request timeout in seconds.
no_cache: boolBypass the cache entirely (no read, no write).
max_age: Option<String>Serve from cache without revalidating if the entry is younger than this
duration (e.g. 15m, 1h).
refresh: boolForce revalidation, ignoring --max-age.
user_agent: Option<String>Override the User-Agent header.
Implementations§
Source§impl FetchArgs
impl FetchArgs
Sourcepub fn cache_policy(&self) -> Result<CachePolicy, RssError>
pub fn cache_policy(&self) -> Result<CachePolicy, RssError>
Resolve the effective cache policy from the cache-related flags.
Sourcepub fn to_params(&self) -> Result<FetchParams, RssError>
pub fn to_params(&self) -> Result<FetchParams, RssError>
Build the FetchParams this invocation should use.
Trait Implementations§
Source§impl Args for FetchArgs
impl Args for FetchArgs
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 FetchArgs
impl FromArgMatches for FetchArgs
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.