Skip to main content

DashboardState

Struct DashboardState 

Source
pub struct DashboardState { /* private fields */ }
Expand description

Live-State des Dashboards. Mutex-geschuetzt, der Server liest und Konsumenten schreiben.

Implementations§

Source§

impl DashboardState

Source

pub fn new() -> Self

Leerer State.

Source

pub fn set_topics(&self, topics: Vec<TopicInfo>)

Setzt die komplette Topic-Liste (ueberschreibt).

Source

pub fn set_participants(&self, ps: Vec<ParticipantInfo>)

Setzt die Participant-Liste.

Source

pub fn set_histograms(&self, hs: Vec<HistogramSnapshot>)

Setzt die Histogramme.

Source

pub fn set_edges(&self, e: Vec<DiscoveryEdge>)

Setzt die Discovery-Edges.

Source

pub fn set_recording(&self, r: RecordingStatus)

Setzt den Recording-Status.

Source

pub fn inject_topics_json(&self, body: &str) -> Result<usize, String>

Phase-B: Inject ueber JSON-Body (POST /api/inject/topics). Erwartet das gleiche Schema wie die GET-Antwort.

Source

pub fn inject_participants_json(&self, body: &str) -> Result<usize, String>

Phase-B: Inject von Participants.

Source

pub fn inject_histograms_json(&self, body: &str) -> Result<usize, String>

Phase-B: Inject von Histograms.

Source

pub fn topics_json(&self) -> String

Liest topics-JSON.

Source

pub fn participants_json(&self) -> String

Liest participants-JSON.

Source

pub fn histograms_json(&self) -> String

Liest histograms-JSON.

Source

pub fn graph_json(&self) -> String

Liest discovery-graph-JSON.

Source

pub fn recording_json(&self) -> String

Liest recording-JSON.

Trait Implementations§

Source§

impl Default for DashboardState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.