pub enum ShapeAttribute<'shape> {
DenyUnknownFields,
Default,
Transparent,
RenameAll(&'shape str),
Arbitrary(&'shape str),
}Expand description
An attribute that can be applied to a shape
Variants§
DenyUnknownFields
Reject deserialization upon encountering an unknown key.
Default
Indicates that, when deserializing, fields from this shape that are
missing in the input should be filled with corresponding field values from
a T::default() (where T is this shape)
Transparent
Indicates that this is a transparent wrapper type, like NewType(T)
it should not be treated like a struct, but like something that can be built
from T and converted back to T
RenameAll(&'shape str)
Specifies a case conversion rule for all fields or variants
Arbitrary(&'shape str)
Custom field attribute containing arbitrary text
Trait Implementations§
Source§impl<'shape> Debug for ShapeAttribute<'shape>
impl<'shape> Debug for ShapeAttribute<'shape>
Source§impl<'shape> PartialEq for ShapeAttribute<'shape>
impl<'shape> PartialEq for ShapeAttribute<'shape>
impl<'shape> StructuralPartialEq for ShapeAttribute<'shape>
Auto Trait Implementations§
impl<'shape> Freeze for ShapeAttribute<'shape>
impl<'shape> RefUnwindSafe for ShapeAttribute<'shape>
impl<'shape> Send for ShapeAttribute<'shape>
impl<'shape> Sync for ShapeAttribute<'shape>
impl<'shape> Unpin for ShapeAttribute<'shape>
impl<'shape> UnwindSafe for ShapeAttribute<'shape>
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