Skip to content

Commit

Permalink
macros: add missing comments to Serialize* attrs
Browse files Browse the repository at this point in the history
Some comments were missing, so I imported them from DeserializeValue.
  • Loading branch information
wprzytula committed Nov 13, 2024
1 parent 76cca3b commit 7d4d91d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scylla-macros/src/serialize/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ struct Attributes {
#[darling(default)]
flavor: Flavor,

// If true, then the type checking code won't verify the column names.
// Columns will be matched to struct fields based solely on the order.
//
// This annotation only works if `enforce_order` flavor is specified.
#[darling(default)]
skip_name_checks: bool,
}
Expand Down Expand Up @@ -47,8 +51,12 @@ impl Field {
#[derive(FromAttributes)]
#[darling(attributes(scylla))]
struct FieldAttributes {
// If set, then serializes from the column with this particular name
// instead of the Rust field name.
rename: Option<String>,

// If true, then the field is not serialized at all, but simply ignored.
// All other attributes are ignored.
#[darling(default)]
skip: bool,
}
Expand Down
8 changes: 8 additions & 0 deletions scylla-macros/src/serialize/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ struct Attributes {
#[darling(default)]
flavor: Flavor,

// If true, then the type checking code won't verify the UDT field names.
// UDT fields will be matched to struct fields based solely on the order.
//
// This annotation only works if `enforce_order` flavor is specified.
#[darling(default)]
skip_name_checks: bool,

Expand Down Expand Up @@ -62,8 +66,12 @@ impl Field {
#[derive(FromAttributes)]
#[darling(attributes(scylla))]
struct FieldAttributes {
// If set, then serializes from the UDT field with this particular name
// instead of the Rust field name.
rename: Option<String>,

// If true, then the field is not serialized at all, but simply ignored.
// All other attributes are ignored.
#[darling(default)]
skip: bool,

Expand Down

0 comments on commit 7d4d91d

Please sign in to comment.