Trait poppler::prelude::AttachmentExt
source · 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
Provided Methods§
sourcefn description(&self) -> Option<GString>
Available on crate feature v20_9
only.
fn description(&self) -> Option<GString>
v20_9
only.§Returns
The attachment’s descriptive text.
sourcefn name(&self) -> Option<GString>
Available on crate feature v20_9
only.
fn name(&self) -> Option<GString>
v20_9
only.§Returns
The attachment’s name.
sourcefn save_to_fd(&self, fd: i32) -> Result<(), Error>
Available on crate feature v21_12
only.
fn save_to_fd(&self, fd: i32) -> Result<(), Error>
v21_12
only.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
Object Safety§
This trait is not object safe.