pub struct Repos {
pub roots: Vec<PathBuf>,
pub scan_ttl: u64,
}Expand description
Where magi repos and GET /api/repos look for local checkouts.
roots is one of the array keys [array_merge_policy] marks as
append-across-layers: which checkouts exist in general 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 - but a repository
that genuinely has an extra root worth scanning is not forced to choose
between an error and losing the machine’s roots outright. Both layers’
roots are scanned; see Config::refuse_split_arrays for the keys that
are still refused.
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