Skip to content

Document the Insertable serialize_as attribute - #5185

Open
zaveshaa wants to merge 1 commit into
diesel-rs:mainfrom
zaveshaa:docs-insertable-deserialize-as
Open

Document the Insertable serialize_as attribute#5185
zaveshaa wants to merge 1 commit into
diesel-rs:mainfrom
zaveshaa:docs-insertable-deserialize-as

Conversation

@zaveshaa

@zaveshaa zaveshaa commented Sep 2, 2026

Copy link
Copy Markdown

References #4840 (one attribute checkbox)

Adds a focused derive test and snapshot for #[diesel(serialize_as = String)] on #[derive(Insertable)], and wires the generated example into the API docs (mirroring the existing insertable_1 / insertable_table_name_1 examples).

The snapshot shows that serialize_as correctly routes the field through Into::<String>::into and uses String for the AsExpression bound of the target column.

Verified with: cargo test -p diesel_derives --lib tests::insertable::insertable_serialize_as_1 (passes).

Add a focused derive test and snapshot for #[diesel(serialize_as = String)]
on Insertable, and wire the generated example into the API docs.
@weiznich

weiznich commented Sep 2, 2026

Copy link
Copy Markdown
Member

Thanks for submitting.

I would like to point to our contributing documentation, especially the section about LLM usage. Please make sure to follow the instructions there and also make sure to follow the PR template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants