Skip to main content

partial_state

Macro partial_state 

Source
macro_rules! partial_state {
    ($($field:ident : $value:expr),* $(,)?) => { ... };
}
Expand description

Macro to create a partial state update.

This macro creates a serde_json::Value object that can be returned from a node to update specific state fields.

§Examples

ⓘ
use regula_core::partial_state;

let update = partial_state! {
    messages: vec![new_message],
    counter: 42,
};