[−][src]Struct xmpp_parsers::jingle_ft::File
Represents a file to be transferred.
Fields
date: Option<DateTime>
The date of last modification of this file.
media_type: Option<String>
The MIME type of this file.
name: Option<String>
The name of this file.
descs: BTreeMap<String, Desc>
The description of this file, possibly localised.
size: Option<u64>
The size of this file, in bytes.
range: Option<Range>
Used to request only a part of this file.
hashes: Vec<Hash>
A list of hashes matching this entire file.
Methods
impl File
[src]
pub fn new() -> File
[src]
Creates a new file descriptor.
pub fn with_date(self, date: DateTime) -> File
[src]
Sets the date of last modification on this file.
pub fn with_date_str(self, date: &str) -> Result<File, Error>
[src]
Sets the date of last modification on this file from an ISO-8601 string.
pub fn with_media_type(self, media_type: String) -> File
[src]
Sets the MIME type of this file.
pub fn with_name(self, name: String) -> File
[src]
Sets the name of this file.
pub fn add_desc(self, lang: &str, desc: Desc) -> File
[src]
Sets a description for this file.
pub fn with_size(self, size: u64) -> File
[src]
Sets the file size of this file, in bytes.
pub fn with_range(self, range: Range) -> File
[src]
Request only a range of this file.
pub fn add_hash(self, hash: Hash) -> File
[src]
Add a hash on this file.
Trait Implementations
impl From<File> for Element
[src]
impl Clone for File
[src]
fn clone(&self) -> File
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for File
[src]
impl Debug for File
[src]
impl TryFrom<Element> for File
[src]
Auto Trait Implementations
impl Send for File
impl Unpin for File
impl Sync for File
impl UnwindSafe for File
impl RefUnwindSafe for File
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut 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> IntoElements for T where
T: Into<Element>,
[src]
T: Into<Element>,
fn into_elements(self, emitter: &mut ElementEmitter)
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self