pub struct PawConfig {
pub default_cli: Option<String>,
pub mouse: Option<bool>,
pub clis: HashMap<String, CustomCli>,
pub presets: HashMap<String, Preset>,
}Expand description
Top-level git-paw configuration.
All fields are optional — absent config files produce empty defaults.
Fields§
§default_cli: Option<String>Default CLI to use when none is specified.
mouse: Option<bool>Whether to enable tmux mouse mode for sessions.
clis: HashMap<String, CustomCli>Custom CLI definitions keyed by name.
presets: HashMap<String, Preset>Named presets keyed by name.
Implementations§
Source§impl PawConfig
impl PawConfig
Sourcepub fn merged_with(&self, overlay: &Self) -> Self
pub fn merged_with(&self, overlay: &Self) -> Self
Returns a new config that merges overlay on top of self.
Scalar fields from overlay take precedence when present.
Map fields are merged with overlay entries winning on key collisions.
Sourcepub fn get_preset(&self, name: &str) -> Option<&Preset>
pub fn get_preset(&self, name: &str) -> Option<&Preset>
Returns a preset by name, if it exists.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PawConfig
impl<'de> Deserialize<'de> for PawConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PawConfig
impl StructuralPartialEq for PawConfig
Auto Trait Implementations§
impl Freeze for PawConfig
impl RefUnwindSafe for PawConfig
impl Send for PawConfig
impl Sync for PawConfig
impl Unpin for PawConfig
impl UnsafeUnpin for PawConfig
impl UnwindSafe for PawConfig
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