pub trait Memberships: Send + Sync {
// Required method
fn held(&self, who: &Principal) -> Vec<Membership>;
// Provided method
fn own_held(&self, who: &Principal) -> Vec<Membership> { ... }
}Expand description
Who holds which role where (menger: its members table, cached). Answered from memory: no I/O on a call.
Required Methods§
fn held(&self, who: &Principal) -> Vec<Membership>
Provided Methods§
Sourcefn own_held(&self, who: &Principal) -> Vec<Membership>
fn own_held(&self, who: &Principal) -> Vec<Membership>
What who holds of its own — without a membership the service
gives every signed-in principal (menger’s everyone grant). It
decides whether who is still waiting for an admin (auth.waiting,
auth.signup); the gate reads Memberships::held. The default is
held: a service with no such grant has nothing to leave out.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".