pub struct FieldMetadata<'ast> {
pub doc: Option<&'ast str>,
pub annotation: Annotation<'ast>,
pub opt: bool,
pub not_exported: bool,
pub priority: MergePriority,
}Expand description
The metadata attached to record fields.
Fields§
§doc: Option<&'ast str>The documentation of the field.
annotation: Annotation<'ast>Type and contract annotations.
opt: boolIf the field is optional.
not_exported: boolIf the field should be skipped during serialization.
priority: MergePriorityThe merge priority.
Implementations§
Trait Implementations§
Source§impl<'ast> Clone for FieldMetadata<'ast>
impl<'ast> Clone for FieldMetadata<'ast>
Source§fn clone(&self) -> FieldMetadata<'ast>
fn clone(&self) -> FieldMetadata<'ast>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CloneTo for FieldMetadata<'_>
impl CloneTo for FieldMetadata<'_>
Source§type Data<'ast> = FieldMetadata<'ast>
type Data<'ast> = FieldMetadata<'ast>
This is always
Self, be we need associated types to make Rust understand that Self is
always parametric over the 'ast lifetime. We’re using GATs to emulate higher-kinded
types.Source§impl<'ast> Combine<'ast> for FieldMetadata<'ast>
impl<'ast> Combine<'ast> for FieldMetadata<'ast>
Source§impl<'ast> CombineAlloc<'ast> for FieldMetadata<'ast>
impl<'ast> CombineAlloc<'ast> for FieldMetadata<'ast>
Source§impl<'ast> Debug for FieldMetadata<'ast>
impl<'ast> Debug for FieldMetadata<'ast>
Source§impl<'ast> Default for FieldMetadata<'ast>
impl<'ast> Default for FieldMetadata<'ast>
Source§fn default() -> FieldMetadata<'ast>
fn default() -> FieldMetadata<'ast>
Returns the “default value” for a type. Read more
Source§impl<'ast> From<Annotation<'ast>> for FieldMetadata<'ast>
impl<'ast> From<Annotation<'ast>> for FieldMetadata<'ast>
Source§fn from(annotation: Annotation<'ast>) -> Self
fn from(annotation: Annotation<'ast>) -> Self
Converts to this type from the input type.
Source§impl<'ast> From<LetMetadata<'ast>> for FieldMetadata<'ast>
impl<'ast> From<LetMetadata<'ast>> for FieldMetadata<'ast>
Source§fn from(let_metadata: LetMetadata<'ast>) -> Self
fn from(let_metadata: LetMetadata<'ast>) -> Self
Converts to this type from the input type.
Source§impl<'ast> PartialEq for FieldMetadata<'ast>
impl<'ast> PartialEq for FieldMetadata<'ast>
Source§impl<'ast> TryFrom<FieldMetadata<'ast>> for LetMetadata<'ast>
impl<'ast> TryFrom<FieldMetadata<'ast>> for LetMetadata<'ast>
impl Allocable for FieldMetadata<'_>
impl<'ast> Eq for FieldMetadata<'ast>
impl<'ast> StructuralPartialEq for FieldMetadata<'ast>
Auto Trait Implementations§
impl<'ast> Freeze for FieldMetadata<'ast>
impl<'ast> RefUnwindSafe for FieldMetadata<'ast>
impl<'ast> Send for FieldMetadata<'ast>
impl<'ast> Sync for FieldMetadata<'ast>
impl<'ast> Unpin for FieldMetadata<'ast>
impl<'ast> UnsafeUnpin for FieldMetadata<'ast>
impl<'ast> UnwindSafe for FieldMetadata<'ast>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more