pub struct Layer {
pub allowed: Option<Vec<String>>,
pub mode: Option<Mode>,
pub denied: Option<Vec<String>>,
pub user_may_extend: Option<bool>,
pub confirm_each_write_back: Option<bool>,
pub notify: Option<Notify>,
}Expand description
One layer’s contribution. Every field is optional, and None means the
layer says nothing about it rather than saying no.
Fields§
§allowed: Option<Vec<String>>Extensions this layer permits.
mode: Option<Mode>Whether allowed stands alone or adds. Defaults to Mode::Replace
deliberately. Concept 10 names the silent hole: an administrator who
writes a list expecting it to be exhaustive and gets it unioned with the
defaults has permitted things they never listed, and never finds out.
Appending is the surprising reading, so it is the one that has to be
asked for.
denied: Option<Vec<String>>Extensions this layer refuses. Always wins, everywhere.
user_may_extend: Option<bool>Whether the user’s own configuration is honoured at all. Only a policy
layer setting this to false has any effect, and what it suppresses is
Origin::Configuration — not another policy layer, which is
administered too.
confirm_each_write_back: Option<bool>Whether every write-back is confirmed, rather than only the session close. Concept 6.2 keeps this off by default: a repack is atomic and unremarkable, and a prompt on every save is friction for everyone who is not archiving.
notify: Option<Notify>How much the tool says without being asked. See Notify.
Implementations§
Source§impl Layer
impl Layer
Sourcepub fn says_nothing(&self) -> bool
pub fn says_nothing(&self) -> bool
Whether this layer sets nothing at all.
A file that parses and holds no key is a layer that exists and has no
opinion, which is different from one that is not there — but not
different in any way a decision can see. What it changes is whether
Effective::managed should call the machine administered, and it
should not: see the note there.
allowed = [] is not this. An empty list is a layer permitting nothing,
which says a great deal.