Struct ffsend_api::file::metadata::Metadata
[−]
[src]
pub struct Metadata { /* fields omitted */ }File metadata, which is send to the server.
Methods
impl Metadata[src]
pub fn from(iv: &[u8], name: String, mime: &Mime) -> Self[src]
Construct metadata from the given properties.
Parameters:
- iv: initialisation vector
- name: file name
- mime: file mimetype
pub fn to_json(&self) -> String[src]
Convert this structure to a JSON string.
pub fn name(&self) -> &str[src]
Get the file name.
pub fn mime(&self) -> &str[src]
Get the file MIME type.
pub fn iv(&self) -> [u8; 12][src]
Get the input vector
pub fn is_archive(&self) -> bool[src]
Check whether this MIME type is recognized as supported archive type.
true is returned if it's an archive, false if not.