pub struct ResolverConfig {
pub default_host: String,
pub cache_dir: Option<PathBuf>,
pub include_dev: bool,
pub additional_hosts: Vec<String>,
}Expand description
Resolver configuration — lives at ~/.config/caixa/config.yaml.
The whole file is optional; defaults work out of the box. When a user
wants to point :nome shorthand at a non-default org, they edit this.
Fields§
§default_host: StringHow to expand a bare :nome "x" when :fonte is omitted.
Default: github:pleme-io.
cache_dir: Option<PathBuf>Where to cache cloned repos. Default: $XDG_CACHE_HOME/caixa or
~/.cache/caixa.
include_dev: boolInclude :deps-dev when resolving.
additional_hosts: Vec<String>Extra hosts the resolver recognizes as shorthand prefixes.
E.g. ["codeberg:my-org"] lets users write (:nome "x" :fonte (:tipo git :repo "codeberg:my-org/x")).
Implementations§
Source§impl ResolverConfig
impl ResolverConfig
Sourcepub fn load_or_default() -> Self
pub fn load_or_default() -> Self
Load from ~/.config/caixa/config.yaml, falling back to defaults.
Source§impl ResolverConfig
impl ResolverConfig
Sourcepub fn load_lisp_or_yaml() -> Self
pub fn load_lisp_or_yaml() -> Self
Load ~/.config/caixa/config.lisp; fall back to config.yaml; else
default.
Trait Implementations§
Source§impl Clone for ResolverConfig
impl Clone for ResolverConfig
Source§fn clone(&self) -> ResolverConfig
fn clone(&self) -> ResolverConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ResolverConfig
impl Debug for ResolverConfig
Source§impl Default for ResolverConfig
impl Default for ResolverConfig
Source§impl<'de> Deserialize<'de> for ResolverConfig
impl<'de> Deserialize<'de> for ResolverConfig
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
Auto Trait Implementations§
impl Freeze for ResolverConfig
impl RefUnwindSafe for ResolverConfig
impl Send for ResolverConfig
impl Sync for ResolverConfig
impl Unpin for ResolverConfig
impl UnsafeUnpin for ResolverConfig
impl UnwindSafe for ResolverConfig
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