pub struct DocumentNode {Show 13 fields
pub id: String,
pub name: String,
pub visible: Option<bool>,
pub locked: Option<bool>,
pub is_fixed: Option<bool>,
pub scroll_behavior: ScrollBehavior,
pub rotation: Option<f64>,
pub component_property_references: Option<HashMap<String, String>>,
pub plugin_data: Option<Option<Value>>,
pub shared_plugin_data: Option<Option<Value>>,
pub bound_variables: Option<Box<IsLayerTraitBoundVariables>>,
pub explicit_variable_modes: Option<HashMap<String, String>>,
pub children: Vec<CanvasNode>,
}
Fields§
§id: String
A string uniquely identifying this node within the document.
name: String
The name given to the node by the user in the tool.
visible: Option<bool>
Whether or not the node is visible on the canvas.
locked: Option<bool>
If true, layer is locked and cannot be edited
is_fixed: Option<bool>
Whether the layer is fixed while the parent is scrolling
scroll_behavior: ScrollBehavior
How layer should be treated when the frame is resized
rotation: Option<f64>
The rotation of the node, if not 0.
component_property_references: Option<HashMap<String, String>>
A mapping of a layer’s property to component property name of component properties attached to this node. The component property name can be used to look up more information on the corresponding component’s or component set’s componentPropertyDefinitions.
plugin_data: Option<Option<Value>>
§bound_variables: Option<Box<IsLayerTraitBoundVariables>>
§explicit_variable_modes: Option<HashMap<String, String>>
A mapping of variable collection ID to mode ID representing the explicitly set modes for this node.
children: Vec<CanvasNode>
Implementations§
Source§impl DocumentNode
impl DocumentNode
pub fn new( id: String, name: String, scroll_behavior: ScrollBehavior, children: Vec<CanvasNode>, ) -> DocumentNode
Trait Implementations§
Source§impl Clone for DocumentNode
impl Clone for DocumentNode
Source§fn clone(&self) -> DocumentNode
fn clone(&self) -> DocumentNode
Returns a duplicate of the value. Read more
1.0.0 · 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 DocumentNode
impl Debug for DocumentNode
Source§impl Default for DocumentNode
impl Default for DocumentNode
Source§fn default() -> DocumentNode
fn default() -> DocumentNode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DocumentNode
impl<'de> Deserialize<'de> for DocumentNode
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 DocumentNode
impl PartialEq for DocumentNode
Source§impl Serialize for DocumentNode
impl Serialize for DocumentNode
impl StructuralPartialEq for DocumentNode
Auto Trait Implementations§
impl Freeze for DocumentNode
impl RefUnwindSafe for DocumentNode
impl Send for DocumentNode
impl Sync for DocumentNode
impl Unpin for DocumentNode
impl UnwindSafe for DocumentNode
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