pub enum FieldSelector {
All,
List {
fields: Vec<String>,
},
}Expand description
Field projection selector.
§Variants
All— include all schema fields in declaration order.List— include only the listed fields, in the specified order.
Variants§
All
Include every schema field in declaration order.
List
Include only the listed fields, in the specified order.
Implementations§
Source§impl FieldSelector
impl FieldSelector
Sourcepub fn validate(&self, schema: &SchemaConfig) -> Result<(), MiniAppError>
pub fn validate(&self, schema: &SchemaConfig) -> Result<(), MiniAppError>
Validate field names against the schema’s canonical field definitions.
§Errors
Returns MiniAppError::Validation (code: VALIDATION_ERROR) if any
field name in FieldSelector::List is not present in the schema.
§Crux compliance
Validates against schema.fields (canonical definitions), never
against actual keys present in materialized data (Crux #2).
Trait Implementations§
Source§impl Debug for FieldSelector
impl Debug for FieldSelector
Source§impl<'de> Deserialize<'de> for FieldSelector
impl<'de> Deserialize<'de> for FieldSelector
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 JsonSchema for FieldSelector
impl JsonSchema for FieldSelector
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for FieldSelector
impl RefUnwindSafe for FieldSelector
impl Send for FieldSelector
impl Sync for FieldSelector
impl Unpin for FieldSelector
impl UnsafeUnpin for FieldSelector
impl UnwindSafe for FieldSelector
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