pub struct Repos {
pub roots: Vec<PathBuf>,
pub scan_ttl: u64,
}Expand description
Where magi plan and the browser interview look for a repository other
than the one they were started against.
roots is an array, so per [array_keys] it can only be declared in one
config layer - the machine layer, since which checkouts exist on disk is a
machine fact in the same way the agent roster is: a repository’s own
magi.toml cannot state where its siblings live before magi has resolved
which repository to read that file from in the first place.
Fields§
§roots: Vec<PathBuf>Roots to scan for a ghq-layout checkout: <root>/<host>/<owner>/<repo>
with a .git directory. Empty by default - nothing is scanned unless
asked to be.
scan_ttl: u64How long a scan is trusted before the next request re-scans it,
seconds. 0 means never trust it: scan on every request. Defaults to
a day, the same order of magnitude as Graph::answer_timeout for
the same reason - a checkout does not usually appear or vanish inside
a session, so there is little to gain from scanning more often than
that, and an explicit refresh exists for the moment one does.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Repos
impl<'de> Deserialize<'de> for Repos
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>,
Auto Trait Implementations§
impl Freeze for Repos
impl RefUnwindSafe for Repos
impl Send for Repos
impl Sync for Repos
impl Unpin for Repos
impl UnsafeUnpin for Repos
impl UnwindSafe for Repos
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more