pub struct OwnerChangeAuthority<'a> {
pub roles: &'a BTreeMap<String, RoleDefinition>,
pub memberships: &'a BTreeMap<RoleMembershipKey, RoleMembership>,
pub current_user: &'a dyn RoleSubject,
pub new_owner: &'a str,
}Fields§
§roles: &'a BTreeMap<String, RoleDefinition>§memberships: &'a BTreeMap<RoleMembershipKey, RoleMembership>§current_user: &'a dyn RoleSubject§new_owner: &'a strImplementations§
Source§impl OwnerChangeAuthority<'_>
impl OwnerChangeAuthority<'_>
pub fn is_superuser(&self) -> bool
pub fn require_owner_change( &self, owner: &str, kind: &str, name: &str, ) -> Result<(), SQLError>
pub fn require_schema_create( &self, schemas: &dyn RelationOwnerSchemas, schema: &str, ) -> Result<(), SQLError>
pub fn require_database_create( &self, security: &BoundDatabaseSecurity, ) -> Result<(), SQLError>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for OwnerChangeAuthority<'a>
impl<'a> !Send for OwnerChangeAuthority<'a>
impl<'a> !Sync for OwnerChangeAuthority<'a>
impl<'a> !UnwindSafe for OwnerChangeAuthority<'a>
impl<'a> Freeze for OwnerChangeAuthority<'a>
impl<'a> Unpin for OwnerChangeAuthority<'a>
impl<'a> UnsafeUnpin for OwnerChangeAuthority<'a>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more