It appears that put_block()
can only be called with data that has a static lifetime. How can I upload a file that I am reading into a buffer? Is this simply not possible at this point?
let mut file_handle = File::open(input_file)?;
let mut buffer: Vec<u8> = Vec::new();
file_handle.read_to_end(&mut buffer)?;
let response = blob_client.put_block("block1", &buffer[..]).into_future().await?;
rustc complains that buffer
does not live long enough.