Authored by Thomas Citharel 🌲

Rust lifetime issue

I'm trying to send chuncks of files through WebDAV using and Files can be quite huge that's why I'm using a direct stream method here.

However, the chunk_iterator variable on line 6 does not live long enough because of the call to client.put(), which has the following signature:

pub fn put<R>(&self, body: R, path: impl AsRef<Path>) -> Result<()>
        R: Read + Send + 'static,

chunk_path is computed through a function that returns a String.

Cargo.toml :

hyperdav = { git = "" }
cdchunking = "0.2.1"

Username, Password and Endpoint are fetched from another Config module (either through clap or a config file).

Any help would be quite appreciated. :)

Edited 1.16 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment