pub enum GroupConfigError {
Io(Error),
Parse(Error),
RedefinedBuiltin {
name: String,
},
DuplicateName {
name: String,
},
InvalidCapability {
group: String,
cap: String,
reason: CapabilityGrammarError,
},
UnsafeUniversalGrant {
group: String,
},
UnknownGroup {
name: String,
},
}Expand description
Errors raised when loading or validating a GroupConfig.
Variants§
Io(Error)
Filesystem IO failed while reading groups.toml.
Parse(Error)
groups.toml failed to parse as TOML, or contains unknown fields.
RedefinedBuiltin
A group entry attempts to redefine a reserved built-in group name.
DuplicateName
Two different group entries share the same name.
Note: the TOML parser itself rejects duplicate keys in a single table, but this variant covers the future case where multiple sources are merged.
InvalidCapability
A group entry contains a capability that fails the grammar validator.
Fields
reason: CapabilityGrammarErrorUnderlying grammar error.
UnsafeUniversalGrant
A custom group grants the universal * capability without
opting in to the unsafe_admin flag.
UnknownGroup
A runtime admin mutation targets a group name that does not
exist in the current config. Returned by
GroupConfig::modify_custom_group and
GroupConfig::remove_group.
Trait Implementations§
Source§impl Debug for GroupConfigError
impl Debug for GroupConfigError
Source§impl Display for GroupConfigError
impl Display for GroupConfigError
Source§impl Error for GroupConfigError
impl Error for GroupConfigError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()