pub enum ServerMessage {
Show 14 variants
Welcome {
client_id: u64,
app_version: String,
},
Rejected {
reason: String,
},
State {
state: Arc<EngineState>,
applied_sequence: u64,
},
Update {
state: Arc<EngineState>,
project: ProjectUpdate,
applied_sequence: u64,
},
Timing {
beat: BeatState,
render: RenderStats,
},
Assets(Vec<AnyAsset>),
AssetsChanged(AssetChanges),
Preview(SharedBytes),
Sound(Arc<SoundSnapshot>),
InputEvents(Vec<InputEvent>),
MidiMonitor(Vec<MidiMonitorEvent>),
MidiLearn(Vec<[u8; 3]>),
Event(EngineEvent),
Pong(u64),
}Expand description
From the server to a user interface.
Variants§
Welcome
Rejected
The connection is closed after this.
State
Fields
state: Arc<EngineState>Update
What changed since the last State or Update: the state without
its project, which comes as a patch.
Timing
The timing, when nothing else changed since the last State.
Assets(Vec<AnyAsset>)
Every asset, sent once after Welcome.
AssetsChanged(AssetChanges)
Assets that changed since Assets or the last AssetsChanged.
Preview(SharedBytes)
The LED output as rendered, for the preview: three bytes per lamp,
512 bytes per universe in the order of OutputConfig::universes.
Only sent to interfaces that subscribed to it.
Sound(Arc<SoundSnapshot>)
Sound levels, at most 30 times a second, to interfaces that subscribed.
InputEvents(Vec<InputEvent>)
Input events that happened since the last of these, to interfaces that subscribed.
MidiMonitor(Vec<MidiMonitorEvent>)
MIDI traffic since the last of these, to interfaces that subscribed.
MidiLearn(Vec<[u8; 3]>)
Messages MIDI learn captured since the last of these.
Event(EngineEvent)
Pong(u64)
Trait Implementations§
Source§impl Clone for ServerMessage
impl Clone for ServerMessage
Source§impl Debug for ServerMessage
impl Debug for ServerMessage
Source§impl<'de> Deserialize<'de> for ServerMessage
impl<'de> Deserialize<'de> for ServerMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ServerMessage
impl PartialEq for ServerMessage
Source§impl Serialize for ServerMessage
impl Serialize for ServerMessage
impl StructuralPartialEq for ServerMessage
Auto Trait Implementations§
impl Freeze for ServerMessage
impl RefUnwindSafe for ServerMessage
impl Send for ServerMessage
impl Sync for ServerMessage
impl Unpin for ServerMessage
impl UnsafeUnpin for ServerMessage
impl UnwindSafe for ServerMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DebugAny for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more