Enum concordium_std::schema::Fields
source · pub enum Fields {
Named(Vec<(String, Type)>),
Unnamed(Vec<Type>),
None,
}
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§
source§impl PartialEq for Fields
impl PartialEq for Fields
impl Eq 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§
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<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
impl<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
source§fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
Attempt to read a structure from a given source and state, failing if
an error occurs during deserialization or reading.