#[non_exhaustive]pub struct CodegenGenericDataField {
pub data_type: CodegenGenericDataFieldDataType,
pub data_type_value: String,
pub required: bool,
pub read_only: bool,
pub is_array: bool,
pub relationship: Option<CodegenGenericDataRelationshipType>,
}Expand description
Describes a field in a generic data schema.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data_type: CodegenGenericDataFieldDataTypeThe data type for the generic data field.
data_type_value: StringThe value of the data type for the generic data field.
required: boolSpecifies whether the generic data field is required.
read_only: boolSpecifies whether the generic data field is read-only.
is_array: boolSpecifies whether the generic data field is an array.
relationship: Option<CodegenGenericDataRelationshipType>The relationship of the generic data schema.
Implementations§
source§impl CodegenGenericDataField
impl CodegenGenericDataField
sourcepub fn data_type(&self) -> &CodegenGenericDataFieldDataType
pub fn data_type(&self) -> &CodegenGenericDataFieldDataType
The data type for the generic data field.
sourcepub fn data_type_value(&self) -> &str
pub fn data_type_value(&self) -> &str
The value of the data type for the generic data field.
sourcepub fn relationship(&self) -> Option<&CodegenGenericDataRelationshipType>
pub fn relationship(&self) -> Option<&CodegenGenericDataRelationshipType>
The relationship of the generic data schema.
source§impl CodegenGenericDataField
impl CodegenGenericDataField
sourcepub fn builder() -> CodegenGenericDataFieldBuilder
pub fn builder() -> CodegenGenericDataFieldBuilder
Creates a new builder-style object to manufacture CodegenGenericDataField.
Trait Implementations§
source§impl Clone for CodegenGenericDataField
impl Clone for CodegenGenericDataField
source§fn clone(&self) -> CodegenGenericDataField
fn clone(&self) -> CodegenGenericDataField
Returns a copy 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 CodegenGenericDataField
impl Debug for CodegenGenericDataField
source§impl PartialEq for CodegenGenericDataField
impl PartialEq for CodegenGenericDataField
source§fn eq(&self, other: &CodegenGenericDataField) -> bool
fn eq(&self, other: &CodegenGenericDataField) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for CodegenGenericDataField
Auto Trait Implementations§
impl Freeze for CodegenGenericDataField
impl RefUnwindSafe for CodegenGenericDataField
impl Send for CodegenGenericDataField
impl Sync for CodegenGenericDataField
impl Unpin for CodegenGenericDataField
impl UnwindSafe for CodegenGenericDataField
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> 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 moreCreates a shared type from an unshared type.