#[non_exhaustive]pub struct FieldSecurityMetadata {
pub encrypted: Option<bool>,
pub requires_scope: Option<String>,
pub on_deny: Option<String>,
pub requires_role: Option<String>,
}Expand description
Security metadata for a single field or type in the compiled schema.
Only non-default annotations are populated; all fields are Option and
serialise with skip_serializing_if = "Option::is_none" so that the JSON
output is minimal.
The struct is #[non_exhaustive] to allow adding new annotation kinds in
future releases without breaking downstream pattern matches.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.encrypted: Option<bool>true when this field is encrypted at rest.
Only present (and always true) for fields that carry an
FieldEncryptionConfig. Absent when the field is not encrypted.
requires_scope: Option<String>OAuth 2.0 scope required to read this field.
When None, the field is visible to any authenticated user (subject to
type-level requires_role).
on_deny: Option<String>Policy applied when the required scope is absent.
Possible values: "reject", "mask".
Only serialised when the policy is non-default (i.e., not "reject").
requires_role: Option<String>Role required to access this type (type-level guard).
Only present on type-keyed entries (keys without a . separator).
Implementations§
Trait Implementations§
Source§impl Clone for FieldSecurityMetadata
impl Clone for FieldSecurityMetadata
Source§fn clone(&self) -> FieldSecurityMetadata
fn clone(&self) -> FieldSecurityMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FieldSecurityMetadata
impl Debug for FieldSecurityMetadata
Source§impl PartialEq for FieldSecurityMetadata
impl PartialEq for FieldSecurityMetadata
Source§fn eq(&self, other: &FieldSecurityMetadata) -> bool
fn eq(&self, other: &FieldSecurityMetadata) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for FieldSecurityMetadata
impl Serialize for FieldSecurityMetadata
impl StructuralPartialEq for FieldSecurityMetadata
Auto Trait Implementations§
impl Freeze for FieldSecurityMetadata
impl RefUnwindSafe for FieldSecurityMetadata
impl Send for FieldSecurityMetadata
impl Sync for FieldSecurityMetadata
impl Unpin for FieldSecurityMetadata
impl UnsafeUnpin for FieldSecurityMetadata
impl UnwindSafe for FieldSecurityMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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