[][src]Struct pdf_create::write::PdfDict

#[must_use]pub struct PdfDict<'a, 'b> { /* fields omitted */ }

API to serialize a dict

Implementations

impl<'a, 'b> PdfDict<'a, 'b>[src]

pub fn field(&mut self, name: &str, value: &dyn Serialize) -> Result<&mut Self>[src]

Write a field

pub fn opt_field<X: Serialize>(
    &mut self,
    name: &str,
    field: &Option<X>
) -> Result<&mut Self>
[src]

Write an optional field, if it is not None

pub fn dict_field<X: Serialize>(
    &mut self,
    name: &str,
    dict: &Dict<X>
) -> Result<&mut Self>
[src]

Write a dict-valued field if it is not empty

pub fn dict_res_field<X: Serialize>(
    &mut self,
    name: &str,
    res: &Resource<Dict<X>>
) -> Result<&mut Self>
[src]

Write a dict-valued field wrapped in a resource

pub fn arr_field<X: Serialize>(
    &mut self,
    name: &str,
    array: &[X]
) -> Result<&mut Self>
[src]

Write a slice-valued field

pub fn finish(&mut self) -> Result<()>[src]

Close the dict

Auto Trait Implementations

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> where
    'a: 'b, 

impl<'a, 'b> !UnwindSafe for PdfDict<'a, 'b>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.