Struct serde_derive_internals::attr::Field
source · [−]pub struct Field { /* private fields */ }
Expand description
Represents field attribute information
Implementations
sourceimpl Field
impl Field
sourcepub fn from_ast(
cx: &Ctxt,
index: usize,
field: &Field,
attrs: Option<&Variant>,
container_default: &Default
) -> Self
pub fn from_ast(
cx: &Ctxt,
index: usize,
field: &Field,
attrs: Option<&Variant>,
container_default: &Default
) -> Self
Extract out the #[serde(...)]
attributes from a struct field.
pub fn name(&self) -> &Name
pub fn aliases(&self) -> Vec<String>
pub fn rename_by_rules(&mut self, rules: &RenameAllRules)
pub fn skip_serializing(&self) -> bool
pub fn skip_deserializing(&self) -> bool
pub fn skip_serializing_if(&self) -> Option<&ExprPath>
pub fn default(&self) -> &Default
pub fn serialize_with(&self) -> Option<&ExprPath>
pub fn deserialize_with(&self) -> Option<&ExprPath>
pub fn ser_bound(&self) -> Option<&[WherePredicate]>
pub fn de_bound(&self) -> Option<&[WherePredicate]>
pub fn borrowed_lifetimes(&self) -> &BTreeSet<Lifetime>
pub fn getter(&self) -> Option<&ExprPath>
pub fn flatten(&self) -> bool
pub fn transparent(&self) -> bool
pub fn mark_transparent(&mut self)
Auto Trait Implementations
impl RefUnwindSafe for Field
impl !Send for Field
impl !Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more