Enum concordium_contracts_common::schema::Fields
source · [−]Expand description
Schema for the fields of a struct or some enum variant.
Variants
Named(Vec<(String, Type)>)
Named fields, e.g., struct Foo {x: u64, y: u32}
.
Unnamed(Vec<Type>)
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
sourceimpl PartialEq<Fields> for Fields
impl PartialEq<Fields> for Fields
impl Eq for Fields
impl StructuralEq for Fields
impl StructuralPartialEq for Fields
Auto Trait Implementations
impl RefUnwindSafe for Fields
impl Send for Fields
impl Sync for Fields
impl Unpin for Fields
impl UnwindSafe for Fields
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more