pub struct RoleBinding {
pub name: String,
pub oid: u32,
pub object_id: [u8; 16],
}Expand description
A selected role keeps its incarnation even if another role later reuses its name or OID.
Fields§
§name: String§oid: u32§object_id: [u8; 16]Implementations§
Source§impl RoleBinding
impl RoleBinding
pub fn identity(&self) -> RoleIdentity
pub fn from_definition(role: &RoleDefinition) -> Result<Self, SQLError>
Sourcepub fn revalidate(
&self,
roles: &BTreeMap<String, RoleDefinition>,
) -> Result<(), SQLError>
pub fn revalidate( &self, roles: &BTreeMap<String, RoleDefinition>, ) -> Result<(), SQLError>
Retain the original incarnation through name changes before publishing a stored role reference.
pub fn require_name<'a>( &self, roles: &'a BTreeMap<String, RoleDefinition>, ) -> Result<&'a str, SQLError>
Trait Implementations§
Source§impl Clone for RoleBinding
impl Clone for RoleBinding
Source§impl Debug for RoleBinding
impl Debug for RoleBinding
Source§impl<'de> Deserialize<'de> for RoleBinding
impl<'de> Deserialize<'de> for RoleBinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RoleBinding
Source§impl PartialEq for RoleBinding
impl PartialEq for RoleBinding
Source§impl RoleSubject for RoleBinding
impl RoleSubject for RoleBinding
fn role_name<'a>( &'a self, roles: &'a BTreeMap<String, RoleDefinition>, ) -> Option<&'a str>
fn role_definition<'a>( &self, roles: &'a BTreeMap<String, RoleDefinition>, ) -> Option<&'a RoleDefinition>
Source§impl Serialize for RoleBinding
impl Serialize for RoleBinding
impl StructuralPartialEq for RoleBinding
Auto Trait Implementations§
impl Freeze for RoleBinding
impl RefUnwindSafe for RoleBinding
impl Send for RoleBinding
impl Sync for RoleBinding
impl Unpin for RoleBinding
impl UnsafeUnpin for RoleBinding
impl UnwindSafe for RoleBinding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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