Struct worker_plus::File
source · pub struct File(_);
Expand description
A File representation used with
FormData
.
Implementations§
source§impl File
impl File
sourcepub fn new(data: impl AsRef<[u8]>, name: &str) -> Self
pub fn new(data: impl AsRef<[u8]>, name: &str) -> Self
Construct a new named file from a buffer.
sourcepub async fn bytes(&self) -> Result<Vec<u8>>
pub async fn bytes(&self) -> Result<Vec<u8>>
Read the file from an internal buffer and get the resulting bytes.
sourcepub fn last_modified(&self) -> Date
pub fn last_modified(&self) -> Date
Get the last_modified metadata property of the file.