pub struct Document { /* private fields */ }Implementations§
Source§impl Document
impl Document
pub fn new() -> Self
pub fn version(&self) -> &str
pub fn objects(&self) -> &BTreeMap<ObjectId, PdfObject>
Sourcepub fn add_object(&mut self, id: ObjectId, obj: PdfObject)
pub fn add_object(&mut self, id: ObjectId, obj: PdfObject)
Inserts an object, keeping the first definition if an id is seen twice
(matches the previous Vec semantics where the first entry won).
pub fn get_object(&self, id: ObjectId) -> Option<&PdfObject>
pub fn get_object_mut(&mut self, id: ObjectId) -> Option<&mut PdfObject>
pub fn set_catalog(&mut self, id: ObjectId)
pub fn catalog(&self) -> Option<ObjectId>
pub fn set_info(&mut self, id: ObjectId)
pub fn info(&self) -> Option<ObjectId>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more