pub struct SceneNode {
pub id: NodeId,
pub kind: NodeKind,
pub style: Style,
pub use_styles: SmallVec<[NodeId; 2]>,
pub constraints: SmallVec<[Constraint; 2]>,
pub animations: SmallVec<[AnimKeyframe; 2]>,
pub annotations: Vec<Annotation>,
pub comments: Vec<String>,
pub place: Option<(HPlace, VPlace)>,
}Expand description
A single node in the scene graph.
Fields§
§id: NodeIdThe node’s ID (e.g. @login_form). Anonymous nodes get auto-IDs.
kind: NodeKindWhat kind of element this is.
style: StyleInline style overrides on this node.
use_styles: SmallVec<[NodeId; 2]>Named theme references (use: base_text).
constraints: SmallVec<[Constraint; 2]>Constraint-based positioning.
animations: SmallVec<[AnimKeyframe; 2]>Animations attached to this node.
annotations: Vec<Annotation>Structured annotations (spec { ... } block).
comments: Vec<String>Line comments (# text) that appeared before this node in the source.
Preserved across parse/emit round-trips so format passes don’t delete them.
place: Option<(HPlace, VPlace)>9-position placement of this child within its parent.
None = default positioning (auto-center for text, origin for others).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SceneNode
impl<'de> Deserialize<'de> for SceneNode
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 SceneNode
impl RefUnwindSafe for SceneNode
impl Send for SceneNode
impl Sync for SceneNode
impl Unpin for SceneNode
impl UnsafeUnpin for SceneNode
impl UnwindSafe for SceneNode
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