pub struct Node {Show 15 fields
pub id: u32,
pub title: String,
pub category: String,
pub position: Vec2,
pub size: Vec2,
pub ports: Vec<Port>,
pub state: NodeState,
pub collapsed: bool,
pub comment: Option<String>,
pub color: Vec4,
pub pinned: bool,
pub metadata: HashMap<String, String>,
pub execution_order: u32,
pub last_processed_frame: u64,
pub processing_time_us: u64,
}Fields§
§id: u32§title: String§category: String§position: Vec2§size: Vec2§ports: Vec<Port>§state: NodeState§collapsed: bool§comment: Option<String>§color: Vec4§pinned: bool§metadata: HashMap<String, String>§execution_order: u32§last_processed_frame: u64§processing_time_us: u64Implementations§
Source§impl Node
impl Node
pub fn new( id: u32, title: impl Into<String>, category: impl Into<String>, ) -> Self
pub fn with_position(self, pos: Vec2) -> Self
pub fn with_color(self, color: Vec4) -> Self
pub fn add_port(&mut self, port: Port)
pub fn recalculate_size(&mut self)
pub fn port_position(&self, port_id: u32) -> Option<Vec2>
pub fn input_ports(&self) -> impl Iterator<Item = &Port>
pub fn output_ports(&self) -> impl Iterator<Item = &Port>
pub fn bounds(&self) -> [Vec2; 2]
pub fn contains_point(&self, p: Vec2) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.