Struct jj_lib::settings::SignSettings
source · pub struct SignSettings {
pub behavior: SignBehavior,
pub user_email: String,
pub key: Option<String>,
}
Expand description
Commit signing settings, describes how to and if to sign commits.
Fields§
§behavior: SignBehavior
What to actually do, see SignBehavior.
user_email: String
The email address to compare against the commit author when determining if the existing signature is “our own” in terms of the sign behavior.
key: Option<String>
The signing backend specific key, to be passed to the signing backend.
Implementations§
source§impl SignSettings
impl SignSettings
sourcepub fn from_settings(settings: &UserSettings) -> Self
pub fn from_settings(settings: &UserSettings) -> Self
Load the signing settings from the config.
sourcepub fn should_sign(&self, commit: &Commit) -> bool
pub fn should_sign(&self, commit: &Commit) -> bool
Check if a commit should be signed according to the configured behavior and email.
Trait Implementations§
source§impl Clone for SignSettings
impl Clone for SignSettings
source§fn clone(&self) -> SignSettings
fn clone(&self) -> SignSettings
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SignSettings
impl Debug for SignSettings
source§impl Default for SignSettings
impl Default for SignSettings
source§fn default() -> SignSettings
fn default() -> SignSettings
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for SignSettings
impl Send for SignSettings
impl Sync for SignSettings
impl Unpin for SignSettings
impl UnwindSafe for SignSettings
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