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 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".
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>,
Source§impl PartialEq for IntermediateField
impl PartialEq for IntermediateField
Source§fn eq(&self, other: &IntermediateField) -> bool
fn eq(&self, other: &IntermediateField) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for IntermediateField
impl Serialize for IntermediateField
impl Eq 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,
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.