Skip to main content

NodeView

Struct NodeView 

Source
#[non_exhaustive]
pub struct NodeView<'s> { pub id: Option<usize>, pub dummy_of: Option<(usize, usize)>, pub x: usize, pub y: usize, pub width: usize, pub height: usize, pub kind: NodeKind, pub label: &'s str, pub content: NodeKindTag, pub payload: Option<&'s str>, }
Expand description

One node of the scene.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§id: Option<usize>

Graph id — None for dummies: their raw ids are synthetic and backend-specific, so the scene never exposes them. Dummies carry dummy_of instead.

§dummy_of: Option<(usize, usize)>

Backend-stable dummy identity: the owning edge’s INPUT index (the style-callback / EdgeView::input_index convention) and the level the dummy occupies — the same pair HitResult::Dummy reports. None for real nodes.

§x: usize

Left edge, in cells.

§y: usize

Top edge, in rows.

§width: usize

Width in cells (including brackets/padding).

§height: usize

Height in rows.

§kind: NodeKind

Real-vs-dummy dichotomy.

§label: &'s str

Label text (empty for dummies).

§content: NodeKindTag

Declared content kind (simple / boxed / custom).

§payload: Option<&'s str>

Custom-node payload — the data half of the template/data pair, rejoined by the scene (“geometry and keyed content meet again here”). None when the node declared no custom content.

Trait Implementations§

Source§

impl<'s> Clone for NodeView<'s>

Source§

fn clone(&self) -> NodeView<'s>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'s> Copy for NodeView<'s>

Source§

impl<'s> Debug for NodeView<'s>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'s> Freeze for NodeView<'s>

§

impl<'s> RefUnwindSafe for NodeView<'s>

§

impl<'s> Send for NodeView<'s>

§

impl<'s> Sync for NodeView<'s>

§

impl<'s> Unpin for NodeView<'s>

§

impl<'s> UnsafeUnpin for NodeView<'s>

§

impl<'s> UnwindSafe for NodeView<'s>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.