mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-30 01:47:55 +00:00
chore(cleanup): Minor reorganization of attr.rs
This commit is contained in:
+12
-12
@@ -21,6 +21,18 @@ pub enum FieldNames {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Represents container (e.g. struct) attribute information
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct ContainerAttrs {
|
||||||
|
deny_unknown_fields: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ContainerAttrs {
|
||||||
|
pub fn deny_unknown_fields(&self) -> bool {
|
||||||
|
self.deny_unknown_fields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Represents field attribute information
|
/// Represents field attribute information
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct FieldAttrs {
|
pub struct FieldAttrs {
|
||||||
@@ -263,18 +275,6 @@ impl<'a> FieldAttrsBuilder<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Represents container (e.g. struct) attribute information
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct ContainerAttrs {
|
|
||||||
deny_unknown_fields: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ContainerAttrs {
|
|
||||||
pub fn deny_unknown_fields(&self) -> bool {
|
|
||||||
self.deny_unknown_fields
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ContainerAttrsBuilder<'a> {
|
pub struct ContainerAttrsBuilder<'a> {
|
||||||
cx: &'a ExtCtxt<'a>,
|
cx: &'a ExtCtxt<'a>,
|
||||||
deny_unknown_fields: bool,
|
deny_unknown_fields: bool,
|
||||||
|
|||||||
Reference in New Issue
Block a user