[−][src]Enum ffsend_api::file::metadata::Metadata
File metadata, which is send to the server.
Variants
Metadata using in Send v2.
Fields of V2
Metadata using in Send v3.
Fields of V3
Methods
impl Metadata
[src]
pub fn from_send2(iv: &[u8], name: String, mime: &Mime) -> Self
[src]
Construct metadata from the given properties.
Parameters:
iv
: initialisation vectorname
: file namemime
: file mimetype
pub fn from_send3(name: String, mime: String, size: u64) -> Self
[src]
Construct metadata from the given properties.
Parameters:
name
: file namemime
: file mimetypesize
: file size
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) -> Option<[u8; 12]>
[src]
Get the input vector if set.
For Firefox Send v3 and above None
is returned as no input vector is used.
pub fn size(&self) -> Option<u64>
[src]
Get the file size if set (>= Send v3
).
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.
Trait Implementations
impl Debug for Metadata
[src]
impl Serialize for Metadata
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Metadata
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Metadata
impl Unpin for Metadata
impl Sync for Metadata
impl UnwindSafe for Metadata
impl RefUnwindSafe for Metadata
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> Same<T> for T
type Output = T
Should always be Self