Struct pdf_writer::TypedDict[][src]

pub struct TypedDict<'a, T, G: Guard = ()> { /* fields omitted */ }
Expand description

Writer for a dictionary with fixed primitive value type.

Implementations

impl<'a, T: Primitive, G: Guard> TypedDict<'a, T, G>[src]

pub fn new(dict: Dict<'a, G>) -> Self[src]

Wrap a dictionary to make it type-safe.

pub fn pair(&mut self, key: Name<'_>, value: T) -> &mut Self[src]

Write a key-value pair.

pub fn len(&self) -> i32[src]

The number of written pairs.

Auto Trait Implementations

impl<'a, T, G> RefUnwindSafe for TypedDict<'a, T, G> where
    G: RefUnwindSafe,
    T: RefUnwindSafe

impl<'a, T, G> Send for TypedDict<'a, T, G> where
    G: Send,
    T: Send

impl<'a, T, G> Sync for TypedDict<'a, T, G> where
    G: Sync,
    T: Sync

impl<'a, T, G> Unpin for TypedDict<'a, T, G> where
    G: Unpin,
    T: Unpin

impl<'a, T, G = ()> !UnwindSafe for TypedDict<'a, T, G>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.