Skip to main content

Facts

Struct Facts 

Source
pub struct Facts {
Show 14 fields pub has_mail_binary: bool, pub has_docs_binary: bool, pub has_graph_binary: bool, pub mail_accounts: Option<usize>, pub docs_accounts: Option<usize>, pub slack_linked: Option<bool>, pub props: Option<Props>, pub provider_credential: bool, pub config_file: bool, pub local_probe: LocalProbe, pub scheduler_installed: bool, pub trigger_count: usize, pub charter: CharterState, pub declined: BTreeSet<String>,
}
Expand description

Everything the impure half gathered, so plan can stay a function.

A struct rather than a pile of arguments because it is going to grow, and because a caller that has to remember the order of six booleans will eventually get one wrong in a way that reads as a working install.

Fields§

§has_mail_binary: bool

Which helper binaries are on PATH. A crates.io install gets each from its own cargo install, so “is it in the workspace” is the wrong question — presence on PATH is the one that matters.

§has_docs_binary: bool§has_graph_binary: bool§mail_accounts: Option<usize>

Whether any account/credential store has something in it. None where the directory could not be read — see Status::Unknown.

§docs_accounts: Option<usize>§slack_linked: Option<bool>§props: Option<Props>

What the default provider’s server said about itself, when it is local and answered.

§provider_credential: bool

Whether the configured provider has a usable credential.

§config_file: bool

Whether a global config file exists at all.

Config::load_global tolerates its absence and returns defaults, which is right — mecha must work before anybody has written one — but it meant a new install was never told the file exists or where it lives, and the first thing anyone needs to change lives in it.

§local_probe: LocalProbe

What the loopback probe found — including whether it ran at all.

See LocalProbe. The point of the probe is to turn anthropic has no usable credential” into “there is a server running right here, shall I write it down”, which is the difference between a remedy and a diagnosis.

§scheduler_installed: bool

Whether a trigger scheduler is running or installed.

§trigger_count: usize§charter: CharterState

What the owner’s charter is doing, read through the ordinary loader.

§declined: BTreeSet<String>

Step ids the owner has said they do not want, from read_declined.

An unreadable store yields an empty set rather than a failure, and the direction is deliberate: showing a step somebody declined is a nuisance, hiding one they never declined is a silently incomplete install. This is the one place in this module where unknown resolves towards more noise, because here noise is the safe side. setup says out loud that the store could not be read — on stderr, and before the --json return, so the scriptable surface carries it too and stdout stays a parseable array.

Trait Implementations§

Source§

impl Clone for Facts

Source§

fn clone(&self) -> Facts

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Facts

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Facts

Source§

fn default() -> Facts

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Facts

§

impl RefUnwindSafe for Facts

§

impl Send for Facts

§

impl Sync for Facts

§

impl Unpin for Facts

§

impl UnsafeUnpin for Facts

§

impl UnwindSafe for Facts

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more