pub struct Arguments {Show 14 fields
pub input_uri: Option<String>,
pub outfile: Option<PathBuf>,
pub largest: bool,
pub parallelism: usize,
pub retries: usize,
pub retry_delay: Duration,
pub compression: u8,
pub headers: Vec<(String, String)>,
pub max_idle_per_host: usize,
pub accept_invalid_certs: bool,
pub timeout: Duration,
pub connect_timeout: Duration,
pub logging: String,
pub tile_storage_folder: Option<PathBuf>,
/* private fields */
}Fields§
§input_uri: Option<String>Input URL or local file name
outfile: Option<PathBuf>File to which the resulting image should be saved
largest: boolIf several zoom levels are available, then select the largest one
parallelism: usizeDegree of parallelism to use. At most this number of tiles will be downloaded at the same time.
retries: usizeNumber of new attempts to make when a tile load fails before giving up. Setting this to 0 is useful to speed up the generic dezoomer, which relies on failed tile loads to detect the dimensions of the image. On the contrary, if a server is not reliable, set this value to a higher number.
retry_delay: DurationAmount of time to wait before retrying a request that failed. Applies only to the first retry. Subsequent retries follow an exponential backoff strategy: each one is twice as long as the previous one.
compression: u8A number between 0 and 100 expressing how much to compress the output image. For lossy output formats such as jpeg, this affects the quality of the resulting image. 0 means less compression, 100 means more compression. Currently affects only the JPEG and PNG encoders.
headers: Vec<(String, String)>Sets an HTTP header to use on requests.
This option can be repeated in order to set multiple headers.
You can use -H "Referer: URL" where URL is the URL of the website’s
viewer page in order to let the site think you come from the legitimate viewer.
max_idle_per_host: usizeMaximum number of idle connections per host allowed at the same time
accept_invalid_certs: boolWhether to accept connecting to insecure HTTPS servers
timeout: DurationMaximum time between the beginning of a request and the end of a response before the request should be interrupted and considered failed
connect_timeout: DurationTime after which we should give up when trying to connect to a server
logging: StringLevel of logging verbosity. Set it to “debug” to get all logging messages.
tile_storage_folder: Option<PathBuf>A place to store the image tiles when after they are downloaded and decrypted. By default, tiles are not stored to disk (which is faster), but using a tile cache allows retrying partially failed downloads, or stitching the tiles with an external program.
Implementations§
Trait Implementations§
Source§impl StructOpt for Arguments
impl StructOpt for Arguments
Source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
clap::ArgMatches. It’s guaranteed to succeed
if matches originates from an App generated by StructOpt::clap called on
the same type, otherwise it must panic.Source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
std::env::args_os).
Calls clap::Error::exit on failure, printing the error message and aborting the program.Source§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
std::env::args_os).
Unlike StructOpt::from_args, returns clap::Error on failure instead of aborting the program,
so calling .exit is up to you.Source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Vec of your making.
Print the error message and quit the program in case of failure. Read moreAuto Trait Implementations§
impl Freeze for Arguments
impl RefUnwindSafe for Arguments
impl Send for Arguments
impl Sync for Arguments
impl Unpin for Arguments
impl UnwindSafe for Arguments
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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().