pub struct CommitCmd {
    pub pretty_print: bool,
    pub user_name: Option<String>,
    pub user_address: Option<String>,
    pub message: Option<String>,
    pub created: Option<DateTime<Local>>,
    pub object_root: Option<String>,
    pub object_id: String,
}
Expand description

Commit an object’s staged changes to a new OCFL version.

Creates a new OCFL version for all of the changes that were staged for an object, all files are deduplicated, and installs the version into the main OCFL repository.

Metadata such as the version author’s name, address, and message should be provided at this time. These values are stamped into the new OCFL version’s metadata.

If the repository is not using a known storage layout, and a new object is being committed, then the storage root relative path to the object’s root must be specified.

Fields

pretty_print: bool

Pretty print the version’s inventory.json file

user_name: Option<String>

Name of the user to attribute the changes to

user_address: Option<String>

Address URI of the user to attribute the changes to. For example, mailto:test@example.com

message: Option<String>

Message describing the changes

created: Option<DateTime<Local>>

RFC 3339 creation timestamp of the version. Default: now

Example timestamp: 2020-12-23T10:11:12-06:00

object_root: Option<String>

Storage root relative path to the object’s root

Should only be specified for new objects in repositories without defined storage layouts, and is otherwise ignored.

object_id: String

ID of the object to commit changes for

Trait Implementations

Append to Command so it can instantiate Self. Read more

Append to Command so it can update self. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more

Assign values from ArgMatches to self.

The type returned in the event of a conversion error.

Performs the conversion.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more