pub trait AttachmentExt: IsA<Attachment> + Sealed + 'static {
    // Provided methods
    fn ctime(&self) -> Option<DateTime> { ... }
    fn description(&self) -> Option<GString> { ... }
    fn mtime(&self) -> Option<DateTime> { ... }
    fn name(&self) -> Option<GString> { ... }
    fn size(&self) -> usize { ... }
    fn save(&self, filename: &str) -> Result<(), Error> { ... }
    fn save_to_fd(&self, fd: i32) -> Result<(), Error> { ... }
}
Expand description

Trait containing all Attachment methods.

Implementors

Attachment

Provided Methods§

source

fn ctime(&self) -> Option<DateTime>

Returns

The attachment’s creation date and time as a [glib::DateTime][crate::glib::DateTime], or None if the creation date and time is not available.

source

fn description(&self) -> Option<GString>

Returns

The attachment’s descriptive text.

source

fn mtime(&self) -> Option<DateTime>

Returns

The attachment’s modification date and time as a [glib::DateTime][crate::glib::DateTime], or None if the modification date and time is not available.

source

fn name(&self) -> Option<GString>

Returns

The attachment’s name.

source

fn size(&self) -> usize

Returns

The attachment’s size.

source

fn save(&self, filename: &str) -> Result<(), Error>

Saves self to a file indicated by filename. If error is set, false will be returned. Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates.

filename

name of file to save

Returns

true, if the file successfully saved

source

fn save_to_fd(&self, fd: i32) -> Result<(), Error>

Saves self to a file referred to by fd. If error is set, false will be returned. Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates. Note that this function takes ownership of fd; you must not operate on it again, nor close it.

fd

a valid file descriptor open for writing

Returns

true, if the file successfully saved

Implementors§