[−][src]Struct pdf_create::write::PdfDict
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]
&mut self,
name: &str,
field: &Option<X>
) -> Result<&mut Self>
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]
&mut self,
name: &str,
dict: &Dict<X>
) -> Result<&mut Self>
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]
&mut self,
name: &str,
res: &Resource<Dict<X>>
) -> Result<&mut Self>
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]
&mut self,
name: &str,
array: &[X]
) -> Result<&mut Self>
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,
'a: 'b,
impl<'a, 'b> !UnwindSafe for PdfDict<'a, 'b>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,