pub enum RoleReference {
Named(String),
Bound(Arc<RoleBinding>),
}Expand description
Explicit SQL names are resolved against the current catalog; captured authority retains its incarnation.
Variants§
Named(String)
Bound(Arc<RoleBinding>)
Implementations§
Source§impl RoleReference
impl RoleReference
pub fn from_identity( identity: RoleIdentity, roles: &BTreeMap<String, RoleDefinition>, ) -> Result<Self, SQLError>
pub fn require_name<'a>( &'a self, roles: &'a BTreeMap<String, RoleDefinition>, ) -> Result<&'a str, SQLError>
pub fn catalog_name( &self, roles: &BTreeMap<String, RoleDefinition>, ) -> Result<String, SQLError>
pub fn bind( &self, roles: &BTreeMap<String, RoleDefinition>, ) -> Result<RoleBinding, SQLError>
Trait Implementations§
Source§impl Clone for RoleReference
impl Clone for RoleReference
Source§impl Debug for RoleReference
impl Debug for RoleReference
Source§impl<'de> Deserialize<'de> for RoleReference
impl<'de> Deserialize<'de> for RoleReference
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 RoleReference
Source§impl From<&str> for RoleReference
impl From<&str> for RoleReference
Source§impl From<String> for RoleReference
impl From<String> for RoleReference
Source§impl PartialEq for RoleReference
impl PartialEq for RoleReference
Source§impl RoleSubject for RoleReference
impl RoleSubject for RoleReference
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 RoleReference
impl Serialize for RoleReference
impl StructuralPartialEq for RoleReference
Auto Trait Implementations§
impl Freeze for RoleReference
impl RefUnwindSafe for RoleReference
impl Send for RoleReference
impl Sync for RoleReference
impl Unpin for RoleReference
impl UnsafeUnpin for RoleReference
impl UnwindSafe for RoleReference
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