weirdnet-access 0.1.0

Weirdnet access policy: Private/Public and Open/Gated as independent axes, a shared permission core apps extend, ranked configurable roles with implications, owner/member/guest actors, and the host-side enforcement order.
Documentation
/// Errors from policy changes.
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum Error {
    /// A name or value is not valid.
    #[error("invalid {what}: {msg}")]
    Invalid {
        /// What.
        what: &'static str,
        /// Why.
        msg: String,
    },
    /// The actor may not do this.
    #[error("not allowed: {0}")]
    Denied(String),
}

impl Error {
    pub(crate) fn invalid(what: &'static str, msg: impl Into<String>) -> Self {
        Error::Invalid { what, msg: msg.into() }
    }
}

/// `Result` with [`Error`].
pub type Result<T, E = Error> = std::result::Result<T, E>;