pub struct GraphViewState {
pub model: GraphModel,
pub decorations: Decorations,
pub selected: Option<String>,
pub pan_x: f32,
pub pan_y: f32,
pub zoom: f32,
}Expand description
The complete observable state (FC-1 / FC-3) of a DecoratedGraphView, in one
serializable, round-trippable struct: the laid-out GraphModel, the
caller-supplied Decorations overlay, the selected node (keyed on its stable
id, FC-5), and the camera (pan + zoom). DecoratedGraphView::state hands back a
&GraphViewState; a headless driver (facett_core::harness) snapshots it after
feeding a Vec<Msg>.
Fields§
§model: GraphModelThe graph to paint (nodes laid out in world space + edges).
decorations: DecorationsThe caller-supplied ring/badge + emphasis-edge overlay.
selected: Option<String>The selected node id, if any (lights its downstream subtree).
pan_x: f32Camera pan (screen-space) — the x component.
pan_y: f32Camera pan (screen-space) — the y component.
zoom: f32Camera zoom (world→screen scale), clamped to [0.25, 4.0] by interaction.
Trait Implementations§
Source§impl Clone for GraphViewState
impl Clone for GraphViewState
Source§fn clone(&self) -> GraphViewState
fn clone(&self) -> GraphViewState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphViewState
impl Debug for GraphViewState
Source§impl Default for GraphViewState
impl Default for GraphViewState
Source§impl<'de> Deserialize<'de> for GraphViewState
impl<'de> Deserialize<'de> for GraphViewState
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
Source§impl PartialEq for GraphViewState
impl PartialEq for GraphViewState
Source§impl Serialize for GraphViewState
impl Serialize for GraphViewState
impl StructuralPartialEq for GraphViewState
Auto Trait Implementations§
impl Freeze for GraphViewState
impl RefUnwindSafe for GraphViewState
impl Send for GraphViewState
impl Sync for GraphViewState
impl Unpin for GraphViewState
impl UnsafeUnpin for GraphViewState
impl UnwindSafe for GraphViewState
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