pub trait IntoFile {
// Required method
fn into_file(self) -> ToFile;
}Expand description
Trait to convert a DeboaResponse into a file writer.
This trait allows converting a DeboaResponse into a ToFile helper type which provides async file writing capabilities.
§Example
ⓘ
use deboa::{request::get, Client};
use deboa_extras::http::utils::file::IntoFile;
let mut client = Client::new();
let response = get("https://example.com")
.send_with(&mut client)
.await
.unwrap();
response
.into_file()
.save("output.txt", None)
.await
.unwrap();