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>,
}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".
Trait Implementations§
Source§impl Clone for IntermediateField
impl Clone for IntermediateField
Source§fn clone(&self) -> IntermediateField
fn clone(&self) -> IntermediateField
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for IntermediateField
impl PartialEq for IntermediateField
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
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<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>
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