[][src]Struct paperclip::v2::codegen::object::ObjectField

pub struct ObjectField {
    pub name: String,
    pub ty_path: String,
    pub description: Option<String>,
    pub is_required: bool,
    pub needs_any: bool,
    pub boxed: bool,
    pub child_req_fields: Vec<String>,
}

Represents a struct field.

Fields

name: String

Name of the field.

ty_path: String

Type of the field as a path.

description: Option<String>

Description of this operation (if any), to be used for docs.

is_required: bool

Whether this field is required (i.e., not optional).

needs_any: bool

Whether this field's type "is" or "has" an Any type.

boxed: bool

Whether this field should be boxed.

child_req_fields: Vec<String>

Required fields of the "deepest" child type in the given definition.

Now, what do I mean by "deepest"? For example, if we had Vec<Vec<Vec<T>>> or Vec<BTreeMap<String, Vec<BTreeMap<String, T>>>>, then "deepest" child type is T (as long as it's not a Vec or BTreeMap).

To understand why we're doing this, see ApiObjectBuilderImpl::write_builder_ty and ApiObjectBuilderImpl::write_value_map functions.

Yours sincerely.

Trait Implementations

impl Clone for ObjectField[src]

impl Debug for ObjectField[src]

Auto Trait Implementations

impl RefUnwindSafe for ObjectField

impl Send for ObjectField

impl Sync for ObjectField

impl Unpin for ObjectField

impl UnwindSafe for ObjectField

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,