pub struct RoleGraph {
pub roles: BTreeMap<String, RoleState>,
pub grants: BTreeMap<GrantKey, GrantState>,
pub default_privileges: BTreeMap<DefaultPrivKey, DefaultPrivState>,
pub memberships: BTreeSet<MembershipEdge>,
}Expand description
Complete state of managed roles, grants, default privileges, and memberships.
Both the manifest expander and the database inspector produce this type.
The diff engine compares two RoleGraph instances to compute changes.
Fields§
§roles: BTreeMap<String, RoleState>Managed roles, keyed by role name.
grants: BTreeMap<GrantKey, GrantState>Object privilege grants, keyed by grant target.
default_privileges: BTreeMap<DefaultPrivKey, DefaultPrivState>Default privilege rules, keyed by (owner, schema, type, grantee).
memberships: BTreeSet<MembershipEdge>Membership edges.
Implementations§
Source§impl RoleGraph
impl RoleGraph
Sourcepub fn from_expanded(
expanded: &ExpandedManifest,
default_owner: Option<&str>,
) -> Result<Self, ManifestError>
pub fn from_expanded( expanded: &ExpandedManifest, default_owner: Option<&str>, ) -> Result<Self, ManifestError>
Build a RoleGraph from an ExpandedManifest.
This converts the manifest’s user-facing types into the normalized model that the diff engine operates on.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoleGraph
impl RefUnwindSafe for RoleGraph
impl Send for RoleGraph
impl Sync for RoleGraph
impl Unpin for RoleGraph
impl UnsafeUnpin for RoleGraph
impl UnwindSafe for RoleGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more