pub struct FieldRegistry { /* private fields */ }Expand description
What this host knows about field names: whatever the operator defined, and
nothing else. Default is an empty one, which is the common case.
Implementations§
Source§impl FieldRegistry
impl FieldRegistry
Sourcepub fn load(dir: &Path) -> Result<Self>
pub fn load(dir: &Path) -> Result<Self>
Every *.toml in dir, each defining one field. An operator may name
anything in their own namespace but never a std: one: that namespace
is the spec’s, and a local file must not mint into it.
pub fn get(&self, name: &str) -> Option<&FieldDef>
Sourcepub fn resolve(&self, name: &str) -> FieldDef
pub fn resolve(&self, name: &str) -> FieldDef
What to prompt for under name: the operator’s definition if there is
one, else a secret string labelled with the name itself.
The fallback is the normal path, not the exception — it is what makes
--field acme:token work with no ceremony anywhere. A name this host
has never heard of is a perfectly good name; it carries no meaning the
host is entitled to interpret, so it is presented verbatim rather than
dressed in invented words.
Trait Implementations§
Source§impl Clone for FieldRegistry
impl Clone for FieldRegistry
Source§fn clone(&self) -> FieldRegistry
fn clone(&self) -> FieldRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more