pub struct XmpWriter<'a> { /* private fields */ }
Expand description
The main writer struct.
Use XmpWriter::new
to create a new instance and get the resulting XMP
metadata by calling XmpWriter::finish
.
Implementations§
source§impl<'n> XmpWriter<'n>
impl<'n> XmpWriter<'n>
source§impl XmpWriter<'_>
impl XmpWriter<'_>
XMP Dublin Core Schema.
sourcepub fn contributor<'a>(
&mut self,
contributor: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn contributor<'a>( &mut self, contributor: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the dc:contributor
property.
All entities responsible for making contributions to the resource not
listed in XmpWriter::creator
.
sourcepub fn coverage(&mut self, coverage: &str) -> &mut Self
pub fn coverage(&mut self, coverage: &str) -> &mut Self
Write the dc:coverage
property.
The scope of the resource.
sourcepub fn creator<'a>(
&mut self,
creator: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn creator<'a>( &mut self, creator: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the dc:creator
property.
An entity primarily responsible for making the resource.
sourcepub fn date(&mut self, date: impl IntoIterator<Item = DateTime>) -> &mut Self
pub fn date(&mut self, date: impl IntoIterator<Item = DateTime>) -> &mut Self
Write the dc:date
property.
Date(s) that something happened to the resource.
sourcepub fn description<'a>(
&mut self,
description: impl IntoIterator<Item = (Option<LangId<'a>>, &'a str)>,
) -> &mut Self
pub fn description<'a>( &mut self, description: impl IntoIterator<Item = (Option<LangId<'a>>, &'a str)>, ) -> &mut Self
Write the dc:description
property.
An account of the resource, possibly in multiple languages.
sourcepub fn format(&mut self, mime: &str) -> &mut Self
pub fn format(&mut self, mime: &str) -> &mut Self
Write the dc:format
property.
The mime type of the resource.
sourcepub fn identifier(&mut self, id: &str) -> &mut Self
pub fn identifier(&mut self, id: &str) -> &mut Self
Write the dc:identifier
property.
An unambiguous reference to the resource within a given context.
sourcepub fn language<'a>(
&mut self,
lang: impl IntoIterator<Item = LangId<'a>>,
) -> &mut Self
pub fn language<'a>( &mut self, lang: impl IntoIterator<Item = LangId<'a>>, ) -> &mut Self
Write the dc:language
property.
Languges used in the resource.
sourcepub fn publisher<'a>(
&mut self,
publisher: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn publisher<'a>( &mut self, publisher: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the dc:publisher
property.
Publishers of the resource.
sourcepub fn relation<'a>(
&mut self,
relation: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn relation<'a>( &mut self, relation: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the dc:relation
property.
List of related resources.
sourcepub fn rights<'a>(
&mut self,
rights: impl IntoIterator<Item = (Option<LangId<'a>>, &'a str)>,
) -> &mut Self
pub fn rights<'a>( &mut self, rights: impl IntoIterator<Item = (Option<LangId<'a>>, &'a str)>, ) -> &mut Self
Write the dc:rights
property.
Informal rights statements, possibly in multiple languages.
sourcepub fn source(&mut self, source: &str) -> &mut Self
pub fn source(&mut self, source: &str) -> &mut Self
Write the dc:source
property.
A related resource from which the described resource is derived.
sourcepub fn subject<'a>(
&mut self,
subject: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn subject<'a>( &mut self, subject: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the dc:subject
property.
A list of phrases or keywords that specify the topic of the resource.
sourcepub fn title<'a>(
&mut self,
title: impl IntoIterator<Item = (Option<LangId<'a>>, &'a str)>,
) -> &mut Self
pub fn title<'a>( &mut self, title: impl IntoIterator<Item = (Option<LangId<'a>>, &'a str)>, ) -> &mut Self
Write the dc:title
property.
A name given to the resource, possibly in multiple languages.
sourcepub fn type_<'a>(
&mut self,
kind: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn type_<'a>( &mut self, kind: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the dc:type
property.
The nature or genre of the resource. Please use XmpWriter::format
to
specify the mime type.
source§impl<'n> XmpWriter<'n>
impl<'n> XmpWriter<'n>
XMP Basic Schema.
sourcepub fn base_url(&mut self, url: &str) -> &mut Self
pub fn base_url(&mut self, url: &str) -> &mut Self
Write the xmp:BaseURL
property.
The base URL for relative URLs in the document.
sourcepub fn create_date(&mut self, date: DateTime) -> &mut Self
pub fn create_date(&mut self, date: DateTime) -> &mut Self
Write the xmp:CreateDate
property.
The date and time the resource was created.
sourcepub fn creator_tool(&mut self, tool: &str) -> &mut Self
pub fn creator_tool(&mut self, tool: &str) -> &mut Self
Write the xmp:CreatorTool
property.
The name of the application used to create the resource.
sourcepub fn xmp_identifier<'a>(
&mut self,
id: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn xmp_identifier<'a>( &mut self, id: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the xmp:Identifier
property.
Unordered array of text strings that identify the resource. The
XmpWriter::idq_scheme
method can be used to specify the scheme.
sourcepub fn label(&mut self, label: &str) -> &mut Self
pub fn label(&mut self, label: &str) -> &mut Self
Write the xmp:Label
property.
A user-defined label for the resource.
sourcepub fn metadata_date(&mut self, date: DateTime) -> &mut Self
pub fn metadata_date(&mut self, date: DateTime) -> &mut Self
Write the xmp:MetadataDate
property.
The date and time the metadata for the resource was last changed.
sourcepub fn modify_date(&mut self, date: DateTime) -> &mut Self
pub fn modify_date(&mut self, date: DateTime) -> &mut Self
Write the xmp:ModifyDate
property.
The date and time the resource was last modified.
sourcepub fn nickname(&mut self, nickname: &str) -> &mut Self
pub fn nickname(&mut self, nickname: &str) -> &mut Self
Write the xmp:Nickname
property.
A short informal name for the resource.
sourcepub fn rating(&mut self, rating: i64) -> &mut Self
pub fn rating(&mut self, rating: i64) -> &mut Self
Write the xmp:Rating
property.
A user-assigned rating of the resource.
sourcepub fn thumbnails(&mut self) -> ThumbnailsWriter<'_, 'n>
pub fn thumbnails(&mut self) -> ThumbnailsWriter<'_, 'n>
Start writing the xmp:Thumbnails
property.
A thumbnail image of the resource.
source§impl XmpWriter<'_>
impl XmpWriter<'_>
XMP Rights Management Schema.
sourcepub fn certificate(&mut self, cert: &str) -> &mut Self
pub fn certificate(&mut self, cert: &str) -> &mut Self
Write the xmpRights:Certificate
property.
A URL with a rights management certificate.
sourcepub fn marked(&mut self, marked: bool) -> &mut Self
pub fn marked(&mut self, marked: bool) -> &mut Self
Write the xmpRights:Marked
property.
Whether the resource has been marked as rights managed. If false, the resource is in the public domain.
sourcepub fn owner<'a>(
&mut self,
owner: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn owner<'a>( &mut self, owner: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the xmpRights:Owner
property.
A list of people or organizations owning the resource.
sourcepub fn usage_terms<'a>(
&mut self,
terms: impl IntoIterator<Item = (Option<LangId<'a>>, &'a str)>,
) -> &mut Self
pub fn usage_terms<'a>( &mut self, terms: impl IntoIterator<Item = (Option<LangId<'a>>, &'a str)>, ) -> &mut Self
Write the xmpRights:UsageTerms
property.
Under what conditions the resource may be used.
sourcepub fn web_statement(&mut self, statement: &str) -> &mut Self
pub fn web_statement(&mut self, statement: &str) -> &mut Self
Write the xmpRights:WebStatement
property.
A URL with a rights management statement.
source§impl<'n> XmpWriter<'n>
impl<'n> XmpWriter<'n>
XMP Media Management Schema.
sourcepub fn derived_from(&mut self) -> ResourceRefWriter<'_, 'n>
pub fn derived_from(&mut self) -> ResourceRefWriter<'_, 'n>
Start writing the xmpMM:DerivedFrom
property.
The document from which this document is derived.
sourcepub fn document_id(&mut self, id: &str) -> &mut Self
pub fn document_id(&mut self, id: &str) -> &mut Self
Write the xmpMM:DocumentID
property.
A common identifier for the document and all of its versions / renditions.
sourcepub fn history(&mut self) -> ResourceEventsWriter<'_, 'n>
pub fn history(&mut self) -> ResourceEventsWriter<'_, 'n>
Start writing the xmpMM:History
property.
A list of actions taken on the document.
sourcepub fn ingredients(&mut self) -> ResourceRefsWriter<'_, 'n>
pub fn ingredients(&mut self) -> ResourceRefsWriter<'_, 'n>
Write the xmpMM:Ingredients
property.
A list of resources that were used to create the document.
sourcepub fn instance_id(&mut self, id: &str) -> &mut Self
pub fn instance_id(&mut self, id: &str) -> &mut Self
Write the xmpMM:InstanceID
property.
A unique identifier for the rendition of the document, updated each time the document is saved.
sourcepub fn managed_from(&mut self) -> ResourceRefWriter<'_, 'n>
pub fn managed_from(&mut self) -> ResourceRefWriter<'_, 'n>
Start writing the xmpMM:ManagedFrom
property.
A reference to the document before it was managed.
sourcepub fn manager(&mut self, manager: &str) -> &mut Self
pub fn manager(&mut self, manager: &str) -> &mut Self
Write the xmpMM:Manager
property.
The name of the application that manages the document.
sourcepub fn manage_to(&mut self, uri: &str) -> &mut Self
pub fn manage_to(&mut self, uri: &str) -> &mut Self
Write the xmpMM:ManageTo
property.
The URI of the document in the management system.
sourcepub fn manage_ui(&mut self, uri: &str) -> &mut Self
pub fn manage_ui(&mut self, uri: &str) -> &mut Self
Write the xmpMM:ManageUI
property.
A web page that allows the user to manage the document.
sourcepub fn manager_variant(&mut self, variant: &str) -> &mut Self
pub fn manager_variant(&mut self, variant: &str) -> &mut Self
Write the xmpMM:ManagerVariant
property.
The name of the variant of the application that manages the document.
sourcepub fn original_doc_id(&mut self, id: &str) -> &mut Self
pub fn original_doc_id(&mut self, id: &str) -> &mut Self
Write the xmpMM:OriginalDocumentID
property.
The ID of the resource from which this document was derived.
sourcepub fn pantry(&mut self) -> PantryWriter<'_, 'n>
pub fn pantry(&mut self) -> PantryWriter<'_, 'n>
Start writing the xmpMM:Pantry
property.
An unordered array of structs with custom properties, each of which must
have an xmpMM:InstanceID
property.
sourcepub fn rendition_class(&mut self, class: RenditionClass<'_>) -> &mut Self
pub fn rendition_class(&mut self, class: RenditionClass<'_>) -> &mut Self
Write the xmpMM:RenditionClass
property.
The type of the rendition. Shall be absent or RenditionClass::Default
if this is not a derived document.
sourcepub fn rendition_params(&mut self, params: &str) -> &mut Self
pub fn rendition_params(&mut self, params: &str) -> &mut Self
Write the xmpMM:RenditionParams
property.
The parameters used to create the rendition.
sourcepub fn version_id(&mut self, id: &str) -> &mut Self
pub fn version_id(&mut self, id: &str) -> &mut Self
Write the xmpMM:VersionID
property.
A unique identifier for the version of the document.
sourcepub fn version_ref(&mut self) -> VersionsWriter<'_, 'n>
pub fn version_ref(&mut self) -> VersionsWriter<'_, 'n>
Start writing the xmpMM:Versions
property.
The list of versions of the document, starting with the oldest version.
source§impl<'n> XmpWriter<'n>
impl<'n> XmpWriter<'n>
Basic Job Management.
sourcepub fn jobs(&mut self) -> JobsWriter<'_, 'n>
pub fn jobs(&mut self) -> JobsWriter<'_, 'n>
Start writing the xmpBJ:JobRef
property.
A reference to jobs in a system that involves this resource.
source§impl<'n> XmpWriter<'n>
impl<'n> XmpWriter<'n>
Paged-text.
sourcepub fn colorants(&mut self) -> ColorantsWriter<'_, 'n>
pub fn colorants(&mut self) -> ColorantsWriter<'_, 'n>
Start writing the xmpTPg:NPages
property.
Colorants used in the document.
sourcepub fn fonts(&mut self) -> FontsWriter<'_, 'n>
pub fn fonts(&mut self) -> FontsWriter<'_, 'n>
Start writing the xmpTPg:Fonts
property.
Fonts used in the document.
sourcepub fn max_page_size(&mut self) -> DimensionsWriter<'_, 'n>
pub fn max_page_size(&mut self) -> DimensionsWriter<'_, 'n>
Start writing the xmpTPg:MaxPageSize
property.
The maximum page size in the document.
sourcepub fn num_pages(&mut self, num: u32) -> &mut Self
pub fn num_pages(&mut self, num: u32) -> &mut Self
Write the xmpTPg:NPages
property.
The number of pages in the document.
sourcepub fn plate_names<'a>(
&mut self,
names: impl IntoIterator<Item = &'a str>,
) -> &mut Self
pub fn plate_names<'a>( &mut self, names: impl IntoIterator<Item = &'a str>, ) -> &mut Self
Write the xmpTPg:PlateNames
property.
The names of the plates needed to print the document.
source§impl XmpWriter<'_>
impl XmpWriter<'_>
XMPIDQ.
sourcepub fn idq_scheme(&mut self, scheme: &str) -> &mut Self
pub fn idq_scheme(&mut self, scheme: &str) -> &mut Self
Write the xmpidq:GImg
property.
Identifies the scheme of the XmpWriter::xmp_identifier
property.
source§impl XmpWriter<'_>
impl XmpWriter<'_>
Adobe PDF.
sourcepub fn pdf_keywords(&mut self, keywords: &str) -> &mut Self
pub fn pdf_keywords(&mut self, keywords: &str) -> &mut Self
Write the pdf:Keywords
property.
The document’s keywords.
sourcepub fn pdf_version(&mut self, version: &str) -> &mut Self
pub fn pdf_version(&mut self, version: &str) -> &mut Self
Write the pdf:PDFVersion
property.
The version of the PDF specification to which the document conforms
(e.g. "1.0", "1.7"
)
source§impl<'n> XmpWriter<'n>
impl<'n> XmpWriter<'n>
PDF/A and PDF/X.
sourcepub fn pdfa_part(&mut self, part: i32) -> &mut Self
pub fn pdfa_part(&mut self, part: i32) -> &mut Self
Write the pdfaid:part
property.
The part of the PDF/A standard to which the document conforms (e.g.
1, 4
)
sourcepub fn pdfa_amd(&mut self, amd: &str) -> &mut Self
pub fn pdfa_amd(&mut self, amd: &str) -> &mut Self
Write the pdfaid:amd
property.
The amendment specifier this file conforms to, if any.
sourcepub fn pdfa_corr(&mut self, corr: &str) -> &mut Self
pub fn pdfa_corr(&mut self, corr: &str) -> &mut Self
Write the pdfaid:corr
property.
The corrigendum specifier this file conforms to, if any.
sourcepub fn extension_schemas(&mut self) -> PdfAExtSchemasWriter<'_, 'n>
pub fn extension_schemas(&mut self) -> PdfAExtSchemasWriter<'_, 'n>
Start writing the pdfaExtension:schemas
property.
Description of all extension schemas used in the document.
sourcepub fn pdfa_conformance(&mut self, conformance: &str) -> &mut Self
pub fn pdfa_conformance(&mut self, conformance: &str) -> &mut Self
Write the pdfaid:conformance
property.
The conformance level of the PDF/A standard to which the document
conforms (e.g. "A", "B"
)
sourcepub fn pdfx_version(&mut self, version: &str) -> &mut Self
pub fn pdfx_version(&mut self, version: &str) -> &mut Self
Write the pdfxid:GTS_PDFXVersion
property.
The version of the PDF/X standard to which the document conforms (e.g.
"PDF/X-3:2003"
)