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: bool

If several zoom levels are available, then select the largest one

parallelism: usize

Degree of parallelism to use. At most this number of tiles will be downloaded at the same time.

retries: usize

Number 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: Duration

Amount 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: u8

A 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: usize

Maximum number of idle connections per host allowed at the same time

accept_invalid_certs: bool

Whether to accept connecting to insecure HTTPS servers

timeout: Duration

Maximum time between the beginning of a request and the end of a response before the request should be interrupted and considered failed

connect_timeout: Duration

Time after which we should give up when trying to connect to a server

logging: String

Level 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

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns clap::App corresponding to the struct.

Builds the struct from 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. Read more

Builds the struct from the command line arguments (std::env::args_os). Calls clap::Error::exit on failure, printing the error message and aborting the program. Read more

Builds the struct from the command line arguments (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. Read more

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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