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
sourceimpl FromArgMatches for CommitCmd
impl FromArgMatches for CommitCmd
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Instantiate Self
from ArgMatches
, parsing the arguments as needed. Read more
sourcefn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches
to self
.
Auto Trait Implementations
impl RefUnwindSafe for CommitCmd
impl Send for CommitCmd
impl Sync for CommitCmd
impl Unpin for CommitCmd
impl UnwindSafe for CommitCmd
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more