pub struct EngineState {Show 13 fields
pub project: Option<Arc<Project>>,
pub project_id: Option<AssetId<Project>>,
pub selected_scene_instance: GridLocation,
pub selected_scene_effect: usize,
pub blackout: bool,
pub blackout_hold: bool,
pub midi_output_active: bool,
pub output_config: OutputConfig,
pub beat: BeatState,
pub tap_count: usize,
pub layout_generation: u64,
pub render: RenderStats,
pub status: ServerStatus,
}Expand description
The engine’s state as user interfaces see it, published every tick.
Fields§
§project: Option<Arc<Project>>The engine’s project, shared: the engine publishes a new Arc only
when the project changed, so an unchanged one is the same Arc and
compares in O(1). It goes over the wire as a plain project.
project_id: Option<AssetId<Project>>§selected_scene_instance: GridLocation§selected_scene_effect: usizeThe effect selected in the selected scene, by its position; it may be past the last effect while an added one is on its way.
blackout: bool§blackout_hold: bool§midi_output_active: bool§output_config: OutputConfig§beat: BeatState§tap_count: usizeTaps counted for the tap button’s indicator.
layout_generation: u64Changes whenever the lamp positions changed: the patch or one of the fixture definitions it uses.
render: RenderStats§status: ServerStatusImplementations§
Source§impl EngineState
impl EngineState
Sourcepub fn without_project(&self) -> Self
pub fn without_project(&self) -> Self
A copy without the project, which goes as a patch.
Sourcepub fn same_but_timing(&self, other: &Self) -> bool
pub fn same_but_timing(&self, other: &Self) -> bool
Whether both differ only in their timing: the beat, which changes every tick and which remote interfaces extrapolate between updates, and the render stats.
Sourcepub fn same_but_timing_and_project(&self, other: &Self) -> bool
pub fn same_but_timing_and_project(&self, other: &Self) -> bool
Whether both differ at most in their timing and their project, which
an update carries on its own (ProjectUpdate).
Trait Implementations§
Source§impl Clone for EngineState
impl Clone for EngineState
Source§impl Debug for EngineState
impl Debug for EngineState
Source§impl Default for EngineState
impl Default for EngineState
Source§impl<'de> Deserialize<'de> for EngineState
impl<'de> Deserialize<'de> for EngineState
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 EngineState
impl PartialEq for EngineState
Source§impl Serialize for EngineState
impl Serialize for EngineState
impl StructuralPartialEq for EngineState
Auto Trait Implementations§
impl Freeze for EngineState
impl RefUnwindSafe for EngineState
impl Send for EngineState
impl Sync for EngineState
impl Unpin for EngineState
impl UnsafeUnpin for EngineState
impl UnwindSafe for EngineState
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