pub struct ItemsSpec {
pub field_type: FieldType,
pub min: Option<Value>,
pub max: Option<Value>,
pub format: Option<String>,
pub values: Option<Vec<String>>,
pub reference: Option<String>,
}Expand description
Element specification for type: array fields.
Accepts two YAML shapes — both are equivalent for fields that need no element constraints:
items: string # bare-name shorthand
items: { type: string } # equivalent map form
items: { type: string, min: 3, max: 3 } # element-level constraints
items: { type: enum, values: [a, b] } # element allowlist
items: { type: uuid, ref: organizations.id } # FK array (Postgres only)Fields§
§field_type: FieldType§min: Option<Value>§max: Option<Value>§format: Option<String>§values: Option<Vec<String>>§reference: Option<String>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemsSpec
impl<'de> Deserialize<'de> for ItemsSpec
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ItemsSpec
Auto Trait Implementations§
impl Freeze for ItemsSpec
impl RefUnwindSafe for ItemsSpec
impl Send for ItemsSpec
impl Sync for ItemsSpec
impl Unpin for ItemsSpec
impl UnsafeUnpin for ItemsSpec
impl UnwindSafe for ItemsSpec
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<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