pub struct XmpMeta { /* private fields */ }
Expand description

The XmpMeta struct allows access to the XMP Toolkit core services.

You can create XmpMeta structs from metadata that you construct, or that you obtain from files using the XMP Toolkit’s XmpFile struct.

Implementations

Creates a new, empty metadata struct.

Registers a namespace URI with a suggested prefix.

If the URI is not registered but the suggested prefix is in use, a unique prefix is created from the suggested one. The actual registered prefix is returned. It is not an error if the URI is already registered, regardless of the prefix.

Arguments
  • namespace_uri: The URI for the namespace. Must be a valid XML URI.

  • suggested_prefix: The suggested prefix to be used if the URI is not yet registered. Must be a valid XML name.

Returns the prefix actually registered for this URI.

NOTE: No checking is done on either the URI or the prefix.

Gets a property value.

When specifying a namespace and path (in this and all other accessors):

  • If a namespace URI is specified, it must be for a registered namespace.
  • If the namespace is specified only by a prefix in the property name path, it must be a registered prefix.
  • If both a URI and path prefix are present, they must be corresponding parts of a registered namespace.
Arguments
  • schema_ns: The namespace URI for the property. The URI must be for a registered namespace. Must not be an empty string.

  • prop_name: The name of the property. Can be a general path expression. Must not be an empty string. The first component can be a namespace prefix; if present without a schema_ns value, the prefix specifies the namespace. The prefix must be for a registered namespace, and if a namespace URI is specified, must match the registered prefix for that namespace.

Creates or sets a property value.

This is the simplest property setter. Use it for top-level simple properties.

Arguments
  • schema_ns: The namespace URI; see property().

  • prop_name: The name of the property. Can be a general path expression. Must not be an empty string. See property for namespace prefix usage.

  • prop_value: The new value.

Creates or sets a property value using an XmpDateTeim structure.

This is the simplest property setter. Use it for top-level simple properties.

Arguments
  • schema_ns: The namespace URI; see property().

  • prop_name: The name of the property. Can be a general path expression. Must not be an empty string. See property for namespace prefix usage.

  • prop_value: The new value.

Rreports whether a property currently exists.

Arguments
  • schema_ns: The namespace URI; see property().

  • prop_name: The name of the property. Can be a general path expression. Must not be an empty string. See property for namespace prefix usage.

Trait Implementations

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.