Enum concordium_std::schema::Fields[][src]

pub enum Fields {
    Named(Vec<(String, Type), Global>),
    Unnamed(Vec<Type, Global>),
    None,
}
Expand description

Schema for the fields of a struct or some enum variant.

Variants

Named(Vec<(String, Type), Global>)

Tuple Fields

Named fields, e.g., struct Foo {x: u64, y: u32}.

Unnamed(Vec<Type, Global>)

Tuple Fields

Unnamed fields, e.g., struct Foo(u64, u32)

None

No fields. Note that this is distinct from an empty set of named or unnamed fields. That is, in Rust there is a (albeit trivial) difference between struct Foo {}, struct Foo, and struct Foo(), all of which are valid, but will have different representations.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Attempt to read a structure from a given source, failing if an error occurs during deserialization or reading. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Attempt to write the structure into the provided writer, failing if only part of the structure could be written. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.