pub struct NamespaceRoleMap<'a> { /* private fields */ }Expand description
Writer for a namespace role map dictionary. PDF 2.0+
This struct is created by Namespace::role_map_ns.
Implementations§
Source§impl NamespaceRoleMap<'_>
impl NamespaceRoleMap<'_>
Sourcepub fn to_pdf_1_7(&mut self, name: Name<'_>, role: StructRole) -> &mut Self
pub fn to_pdf_1_7(&mut self, name: Name<'_>, role: StructRole) -> &mut Self
Write an entry mapping a custom structure type to an element in the standard (PDF 1.7) namespace.
Sourcepub fn to_namespace(
&mut self,
name: Name<'_>,
role: Name<'_>,
ns_ref: Ref,
) -> &mut Self
pub fn to_namespace( &mut self, name: Name<'_>, role: Name<'_>, ns_ref: Ref, ) -> &mut Self
Write an entry mapping a custom structure type to an element in the
namespace referenced by the namespace dictionary the value of the
ns_ref parameter points to.
Sourcepub fn to_pdf_2_0(
&mut self,
name: Name<'_>,
role: StructRole2,
pdf_2_ns: Ref,
) -> &mut Self
pub fn to_pdf_2_0( &mut self, name: Name<'_>, role: StructRole2, pdf_2_ns: Ref, ) -> &mut Self
Write an entry mapping a custom structure type to an element in the PDF 2.0 namespace.
The pdf_2_ns parameter is an indirect reference to a PDF 2.0 namespace
dictionary. You can create this dictionary by using Chunk::namespace
and then calling Namespace::pdf_2_ns on the returned writer.
Methods from Deref<Target = Dict<'a>>§
Sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.
Sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value).
Sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.