pub struct EntityRow {
pub kind: EntityKind,
pub id: String,
pub default_included: bool,
pub source: String,
}Expand description
One row from access_control_entities.
Owns the per-entity default_included flag and a provenance string
identifying which loader pass first registered the entity
("profile:<name>", "roles.yaml", or "bootstrap:*" for rows
promoted from older schemas by a migration).
Callers pair this with AccessRules from
access_control_rules and hand both to crate::authz::resolver::resolve.
A None lookup result means the entity is unknown to access control and
the resolver returns super::decision::DenyReason::UnknownEntity rather
than the generic NotAssigned.
Fields§
§kind: EntityKind§id: String§default_included: bool§source: StringTrait Implementations§
Source§impl<'de> Deserialize<'de> for EntityRow
impl<'de> Deserialize<'de> for EntityRow
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 EntityRow
impl StructuralPartialEq for EntityRow
Auto Trait Implementations§
impl Freeze for EntityRow
impl RefUnwindSafe for EntityRow
impl Send for EntityRow
impl Sync for EntityRow
impl Unpin for EntityRow
impl UnsafeUnpin for EntityRow
impl UnwindSafe for EntityRow
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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