Struct fp_bindgen::types::FieldAttrs
source · [−]pub struct FieldAttrs {
pub default: Option<String>,
pub deserialize_with: Option<String>,
pub flatten: bool,
pub rename: Option<String>,
pub serialize_with: Option<String>,
pub skip_serializing_if: Option<String>,
}
Fields
default: Option<String>
Optional path to a function that will produce the default value in case the field is omitted from the serialized representation.
See also: https://serde.rs/field-attrs.html#default--path
An empty string may be used as value, in which case Default::default
is assumed. See also: https://serde.rs/field-attrs.html#default
deserialize_with: Option<String>
Optional Serde dependency used for deserialization.
flatten: bool
Determines whether the field should be flattened into the parent struct.
rename: Option<String>
Optional name to use in the serialized format (only used if different than the field name itself).
See also: https://serde.rs/field-attrs.html#rename
serialize_with: Option<String>
Optional Serde dependency used for serialization.
skip_serializing_if: Option<String>
Optional path to a function to determine whether serialized should be skipped for a particular value.
E.g.: can be used to omit Option
s by specifying
skip_serializing_if = "Option::is_none"
.
See also: https://serde.rs/field-attrs.html#skip_serializing_if
Implementations
sourceimpl FieldAttrs
impl FieldAttrs
Trait Implementations
sourceimpl Clone for FieldAttrs
impl Clone for FieldAttrs
sourcefn clone(&self) -> FieldAttrs
fn clone(&self) -> FieldAttrs
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FieldAttrs
impl Debug for FieldAttrs
sourceimpl Default for FieldAttrs
impl Default for FieldAttrs
sourcefn default() -> FieldAttrs
fn default() -> FieldAttrs
Returns the “default value” for a type. Read more
sourceimpl Hash for FieldAttrs
impl Hash for FieldAttrs
sourceimpl Parse for FieldAttrs
impl Parse for FieldAttrs
fn parse(input: ParseStream<'_>) -> Result<Self>
sourceimpl PartialEq<FieldAttrs> for FieldAttrs
impl PartialEq<FieldAttrs> for FieldAttrs
sourcefn eq(&self, other: &FieldAttrs) -> bool
fn eq(&self, other: &FieldAttrs) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for FieldAttrs
impl StructuralEq for FieldAttrs
impl StructuralPartialEq for FieldAttrs
Auto Trait Implementations
impl RefUnwindSafe for FieldAttrs
impl Send for FieldAttrs
impl Sync for FieldAttrs
impl Unpin for FieldAttrs
impl UnwindSafe for FieldAttrs
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