nuit_core/update.rs
1use serde::{Deserialize, Serialize};
2
3use crate::Animation;
4
5#[derive(Debug, Default, Copy, Clone, PartialEq, Serialize, Deserialize)]
6#[serde(rename_all = "camelCase")]
7pub struct Update {
8 animation: Option<Animation>,
9}
10
11impl Update {
12 pub fn new(animation: Option<Animation>) -> Self {
13 Self { animation }
14 }
15
16 pub fn with_animation(animation: Animation) -> Self {
17 Self { animation: Some(animation) }
18 }
19}