pub struct PdfDict<'a, 'b> { /* private fields */ }Expand description
API to serialize a dict
Implementations§
Source§impl<'a, 'b> PdfDict<'a, 'b>
impl<'a, 'b> PdfDict<'a, 'b>
Sourcepub fn opt_field<X: Serialize>(
&mut self,
name: &str,
field: &Option<X>,
) -> Result<&mut Self>
pub fn opt_field<X: Serialize>( &mut self, name: &str, field: &Option<X>, ) -> Result<&mut Self>
Write an optional field, if it is not None
Sourcepub fn dict_field<X: Serialize>(
&mut self,
name: &str,
dict: &Dict<X>,
) -> Result<&mut Self>
pub fn dict_field<X: Serialize>( &mut self, name: &str, dict: &Dict<X>, ) -> Result<&mut Self>
Write a dict-valued field if it is not empty
Sourcepub fn dict_res_field<X: Serialize>(
&mut self,
name: &str,
res: &Resource<Dict<X>>,
) -> Result<&mut Self>
pub fn dict_res_field<X: Serialize>( &mut self, name: &str, res: &Resource<Dict<X>>, ) -> Result<&mut Self>
Write a dict-valued field wrapped in a resource
Auto Trait Implementations§
impl<'a, 'b> Freeze for PdfDict<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for PdfDict<'a, 'b>
impl<'a, 'b> !Send for PdfDict<'a, 'b>
impl<'a, 'b> !Sync for PdfDict<'a, 'b>
impl<'a, 'b> Unpin for PdfDict<'a, 'b>
impl<'a, 'b> !UnwindSafe for PdfDict<'a, 'b>
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