Enum json::Patch
zaun_community_protocol::json::Patch · Enum
pub enum Patch<T> { … }A field that distinguishes “absent” from “null” in update commands
(channel.update with "topic": null clears the topic; no topic leaves it).
Use with #[serde(default, skip_serializing_if = "Patch::is_keep")].
Variants
Section titled “Variants”The field was absent: keep the current value.
The field was null: clear it.
Set(T)
Section titled “Set(T)”The field was present: set it.
Methods
Section titled “Methods”is_keep
Section titled “is_keep”pub const fn is_keep(&self) -> boolWhether the field was absent.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Default, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq