MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / patch

Method patch

crates/firewheel-nodes/src/triple_buffer.rs:82–88  ·  view source on GitHub ↗
(data: &ParamData, _: &[u32])

Source from the content-addressed store, hash-verified

80 type Patch = Self;
81
82 fn patch(data: &ParamData, _: &[u32]) -> Result<Self::Patch, PatchError> {
83 match data {
84 ParamData::U32(samples) => Ok(Self::Samples(*samples)),
85 ParamData::F64(seconds) => Ok(Self::Seconds(*seconds)),
86 _ => Err(PatchError::InvalidData),
87 }
88 }
89
90 fn apply(&mut self, value: Self::Patch) {
91 *self = value;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected