#[non_exhaustive]pub struct CommitOptions {
pub request: CommitRequest,
pub scope: CommitScope,
}Expand description
Request plus scope for Commits::create and Commits::plan.
Build with Self::new after staging (for crate::porcelain::commit::CommitScope::Staged)
or to preview auto-staging behavior via CommitScope::AutoStage.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.request: CommitRequestAuthor, message, hooks, amend flags, and related commit inputs.
scope: CommitScopeWhich paths and staging mode apply (AutoStage, Staged, pathspecs, or patch).
Implementations§
Source§impl CommitOptions
impl CommitOptions
Sourcepub fn new(request: CommitRequest, scope: CommitScope) -> Self
pub fn new(request: CommitRequest, scope: CommitScope) -> Self
Start options from request and scope.
Sourcepub fn with_request(self, request: CommitRequest) -> Self
pub fn with_request(self, request: CommitRequest) -> Self
Sets request.
Sourcepub fn with_scope(self, scope: CommitScope) -> Self
pub fn with_scope(self, scope: CommitScope) -> Self
Sets scope.
Trait Implementations§
Source§impl Clone for CommitOptions
impl Clone for CommitOptions
Auto Trait Implementations§
impl Forget for CommitOptions
impl Freeze for CommitOptions
impl RefUnwindSafe for CommitOptions
impl Send for CommitOptions
impl Sync for CommitOptions
impl Unpin for CommitOptions
impl UnsafeUnpin for CommitOptions
impl UnwindSafe for CommitOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more