Skip to main content

dictionary

Macro dictionary 

Source
macro_rules! dictionary {
    () => { ... };
    ($( $key:expr => $value:expr ),+ $(,)?) => { ... };
}
Expand description

Build a Dictionary from "Key" => value pairs. A &str value becomes a name.

use rusty_pdf_core::{dictionary, Object};
let d = dictionary! { "Type" => "Page", "Rotate" => 90 };
assert_eq!(d.get(b"Type"), Some(&Object::name("Page")));