Struct Node

Source
pub struct Node {
Show 33 fields pub node_type: NodeType, pub is_static: bool, pub is_stretchy: bool, pub is_smart_stretch: bool, pub do_not_apply_smart_stretch: bool, pub use_segment_color: bool, pub use_circle_outline: bool, pub circle_is_hollow: bool, pub use_gradient: bool, pub reverse_gradient: bool, pub gradient_mode: i16, pub use_segment_scale: bool, pub local_x: f32, pub local_y: f32, pub scale: f32, pub default_length: f32, pub length: f32, pub default_thickness: i32, pub thickness: i32, pub segment_curve_radius_and_default_curve_radius: i32, pub curve_circulization: bool, pub segment_curve_polyfill_precision: i16, pub half_arc: bool, pub right_triangle_direction: i16, pub triangle_upside_down: bool, pub trapezoid_top_thickness_ratio: f32, pub num_polygon_vertices: i16, pub default_local_angle: f32, pub local_angle: f32, pub default_angle: f32, pub color: Color, pub gradient_color: Color, pub circle_outline_color: Color, /* private fields */
}

Fields§

§node_type: NodeType§is_static: bool§is_stretchy: bool§is_smart_stretch: bool§do_not_apply_smart_stretch: bool§use_segment_color: bool§use_circle_outline: bool§circle_is_hollow: bool§use_gradient: bool§reverse_gradient: bool§gradient_mode: i16§use_segment_scale: bool§local_x: f32§local_y: f32§scale: f32§default_length: f32§length: f32§default_thickness: i32§thickness: i32§segment_curve_radius_and_default_curve_radius: i32§curve_circulization: bool§segment_curve_polyfill_precision: i16§half_arc: bool§right_triangle_direction: i16§triangle_upside_down: bool§trapezoid_top_thickness_ratio: f32§num_polygon_vertices: i16§default_local_angle: f32§local_angle: f32§default_angle: f32§color: Color§gradient_color: Color§circle_outline_color: Color

Implementations§

Source§

impl Node

Source

pub fn new() -> Self

Creates a new, empty Node.

Source

pub fn from_options(options: NodeOptions) -> Self

Source

pub fn to_options(&self) -> NodeOptions

Source

pub fn build_serializable_tree( &self, graph: &Graph<Rc<RefCell<Node>>, ()>, current: NodeIndex, ) -> SerializableNode

Source

pub fn get_draw_order_index(&self) -> DrawOrderIndex

Source

pub fn update<F>(rc_node: &Rc<RefCell<Self>>, f: F)
where F: FnOnce(&mut Self),

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Node

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnwindSafe for Node

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.