pub struct SysNode {
pub id: String,
pub label: String,
pub color: Color32,
pub badge: u64,
pub pos: (f32, f32),
pub detail: String,
}Expand description
One system in the map. Positions are normalized (0.0..=1.0 of the
canvas), so the layout is resolution-independent and deterministic — ideal
for headless rendering and screenshots.
Fields§
§id: StringStable id (used for selection + edges). Unique within a chart.
label: StringHuman label drawn next to the node.
color: Color32Node colour (the host picks the policy — by status, by hash, …).
badge: u64A small count/status badge drawn on the node (e.g. an event count).
pos: (f32, f32)Normalized position in the canvas (0,0 = top-left, 1,1 = bottom-right).
detail: StringFree-form detail shown in the inline panel when this node is selected.
Hosts that draw richer detail can leave this empty and render their own
widgets after ui() keyed off SystemChart::selected.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SysNode
impl<'de> Deserialize<'de> for SysNode
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for SysNode
Auto Trait Implementations§
impl Freeze for SysNode
impl RefUnwindSafe for SysNode
impl Send for SysNode
impl Sync for SysNode
impl Unpin for SysNode
impl UnsafeUnpin for SysNode
impl UnwindSafe for SysNode
Blanket Implementations§
impl<T> Allocation for T
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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