pub struct IntermediateField {
pub name: String,
pub field_type: String,
pub nullable: bool,
pub description: Option<String>,
pub directives: Option<Vec<IntermediateAppliedDirective>>,
pub requires_scope: Option<String>,
pub on_deny: Option<String>,
pub authorize: Option<bool>,
pub hierarchy: Option<String>,
}Expand description
Field definition in intermediate format
NOTE: Uses type field (not field_type)
This is the language-agnostic format. Rust conversion happens in converter.
Fields§
§name: StringField name (e.g., “id”)
field_type: StringField type name (e.g., “Int”, “String”, “User”)
Language-agnostic: All languages use “type”, not “field_type”
nullable: boolIs field nullable?
description: Option<String>Field description (from docstring)
directives: Option<Vec<IntermediateAppliedDirective>>Applied directives (e.g., @deprecated)
requires_scope: Option<String>Scope required to access this field (field-level access control)
When set, users must have this scope in their JWT to query this field. Supports patterns like “read:Type.field” or custom scopes like “hr:view_pii”.
§Example
{
"name": "salary",
"type": "Int",
"nullable": false,
"requires_scope": "read:Employee.salary"
}on_deny: Option<String>Policy when the user lacks requires_scope: "reject" (default) or "mask".
Whether this field is gated by the dynamic field authorizer at runtime.
When true, the compiled field is marked policy-gated
(FieldDefinition.authorize) and a configured FieldAuthorizer is consulted
per row. Defaults to false when absent.
§Example
{
"name": "email",
"type": "String",
"nullable": true,
"authorize": true
}hierarchy: Option<String>Named hierarchy reference for ID-based ltree operators.
References a key in the hierarchies config map.
Trait Implementations§
Source§impl Clone for IntermediateField
impl Clone for IntermediateField
Source§fn clone(&self) -> IntermediateField
fn clone(&self) -> IntermediateField
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 IntermediateField
impl Debug for IntermediateField
Source§impl<'de> Deserialize<'de> for IntermediateField
impl<'de> Deserialize<'de> for IntermediateField
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>,
impl Eq for IntermediateField
Source§impl PartialEq for IntermediateField
impl PartialEq for IntermediateField
Source§impl Serialize for IntermediateField
impl Serialize for IntermediateField
impl StructuralPartialEq for IntermediateField
Auto Trait Implementations§
impl Freeze for IntermediateField
impl RefUnwindSafe for IntermediateField
impl Send for IntermediateField
impl Sync for IntermediateField
impl Unpin for IntermediateField
impl UnsafeUnpin for IntermediateField
impl UnwindSafe for IntermediateField
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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