pub struct SerdeField {
pub rename: Option<String>,
pub skip: bool,
pub skip_serializing: bool,
pub skip_serializing_if: bool,
pub skip_deserializing: bool,
pub flatten: bool,
pub has_default: bool,
pub with: bool,
}Expand description
Serde attributes parsed from a field.
Fields§
§rename: Option<String>§skip: bool§skip_serializing: bool§skip_serializing_if: bool§skip_deserializing: bool§flatten: bool§has_default: bool§with: boolImplementations§
Source§impl SerdeField
impl SerdeField
Sourcepub fn from_attrs(attrs: &[Attribute]) -> Result<Self>
pub fn from_attrs(attrs: &[Attribute]) -> Result<Self>
Parse serde field attributes.
Sourcepub fn maybe_omitted(&self) -> bool
pub fn maybe_omitted(&self) -> bool
Whether this field may be omitted from serialized output.
Trait Implementations§
Source§impl Clone for SerdeField
impl Clone for SerdeField
Source§fn clone(&self) -> SerdeField
fn clone(&self) -> SerdeField
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 Debug for SerdeField
impl Debug for SerdeField
Source§impl Default for SerdeField
impl Default for SerdeField
Source§fn default() -> SerdeField
fn default() -> SerdeField
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SerdeField
impl RefUnwindSafe for SerdeField
impl Send for SerdeField
impl Sync for SerdeField
impl Unpin for SerdeField
impl UnsafeUnpin for SerdeField
impl UnwindSafe for SerdeField
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