[][src]Enum paperclip::v2::codegen::object::ObjectContainer

pub enum ObjectContainer {
    Enum {
        variants: Vec<ObjectVariant>,
        is_string: bool,
    },
    Struct {
        fields: Vec<ObjectField>,
    },
}

Container for the struct/enum containing fields/variants.

Variants

Enum

Fields of Enum

variants: Vec<ObjectVariant>

Variants if it's an enum.

NOTE: Currently, we only support simple enums.

is_string: bool

Flag to represent whether this enum is a string. When that's the case, we leave de/serialization to serde completely.

Struct

Fields of Struct

fields: Vec<ObjectField>

Fields if it's a struct.

Methods

impl ObjectContainer[src]

pub fn is_enum(&self) -> bool[src]

Returns whether this object is an enum.

pub fn is_string_enum(&self) -> bool[src]

Returns whether this enum is to represent a string.

Trait Implementations

impl Clone for ObjectContainer[src]

impl Debug for ObjectContainer[src]

impl Default for ObjectContainer[src]

Auto Trait Implementations

impl RefUnwindSafe for ObjectContainer

impl Send for ObjectContainer

impl Sync for ObjectContainer

impl Unpin for ObjectContainer

impl UnwindSafe for ObjectContainer

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>,