pub struct Obj<'a> { /* private fields */ }
Expand description
Writer for an arbitrary object.
Implementations§
source§impl<'a> Obj<'a>
impl<'a> Obj<'a>
sourcepub fn start<W: Writer<'a>>(self) -> W
pub fn start<W: Writer<'a>>(self) -> W
Start writing with an arbitrary writer.
For example, using this, you could write a Type 1 font directly into a page’s resource directionary.
use pdf_writer::{Pdf, Ref, Name, writers::Type1Font};
let mut pdf = Pdf::new();
pdf.page(Ref::new(1))
.resources()
.fonts()
.insert(Name(b"F1"))
.start::<Type1Font>()
.base_font(Name(b"Helvetica"));
Auto Trait Implementations§
impl<'a> Freeze for Obj<'a>
impl<'a> RefUnwindSafe for Obj<'a>
impl<'a> Send for Obj<'a>
impl<'a> Sync for Obj<'a>
impl<'a> Unpin for Obj<'a>
impl<'a> !UnwindSafe for Obj<'a>
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