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