pub enum NodeKind {
Root,
Generic,
Group,
Frame {
width: f32,
height: f32,
clip: bool,
layout: LayoutMode,
},
Rect {
width: f32,
height: f32,
},
Ellipse {
rx: f32,
ry: f32,
},
Path {
commands: Vec<PathCmd>,
},
Image {
source: ImageSource,
width: f32,
height: f32,
fit: ImageFit,
},
Text {
content: String,
max_width: Option<f32>,
},
}Expand description
The node kinds in the scene DAG.
Variants§
Root
Root of the document.
Generic
Generic placeholder — no visual shape assigned yet.
Used for spec-only nodes: @login_btn { spec "CTA" }
Group
Organizational container (like Figma Group). Auto-sizes to children, no own styles or layout modes.
Frame
Frame — visible container with explicit size and optional clipping. Like a Figma frame: has fill/stroke, declared dimensions, clips overflow.
Rect
Rectangle.
Ellipse
Ellipse / circle.
Path
Freeform path (pen tool output).
Image
Embedded image (R3.32).
Text
Text label. Optional max_width constrains horizontal extent
for word wrapping (set via resize handle drag).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeKind
impl<'de> Deserialize<'de> for NodeKind
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
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
impl UnwindSafe for NodeKind
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
Mutably borrows from an owned value. Read more