From c48109ca66ea145c23aac733fbf5ad6a01841375 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Tue, 1 Aug 2023 15:51:57 +0100 Subject: [PATCH] docs: add note for 'Id' casing --- STYLE_GUIDE.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md index 4e955e5d..7999b388 100644 --- a/STYLE_GUIDE.md +++ b/STYLE_GUIDE.md @@ -2,6 +2,10 @@ Beyond using Cargo format and Clippy, there are some specific code style guidelines laid out in this document for different parts of the project. +## Writing Style + +- Shorten "identifier" to "Id" with that exact casing, i.e. Server Id. + ## `core/database` crate w.r.t. `model.rs` files @@ -22,6 +26,7 @@ w.r.t. `model.rs` files ); ``` - `auto_derived!` macro accepts multiple entries and should be used as such: + ```rust auto_derived!( /// Optional fields on server object @@ -31,6 +36,7 @@ w.r.t. `model.rs` files pub enum FieldsRole { .. } ); ``` + - If special serialisation conditions are required, such as checking if a boolean is false, use the existing definitions for these functions from the crate root: ```rust #[serde(skip_serializing_if = "crate::if_false", default)]