Skip to main content

NodeRefTarget

Trait NodeRefTarget 

Source
pub trait NodeRefTarget {
    // Required method
    fn bind_node_ref(&mut self, id: NodeId);
}
Expand description

Target storage that receives a created NodeId via view! node_ref:.

Required Methods§

Source

fn bind_node_ref(&mut self, id: NodeId)

Stores the mounted NodeId handle into this reference target.

§Arguments
  • &Self - Mutable reference target.
  • NodeId - Newly created scene node handle.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl NodeRefTarget for Cell<NodeId>

NodeRefTarget implementation storing a NodeId into a Cell<NodeId>.

Source§

fn bind_node_ref(&mut self, id: NodeId)

Sets self to id.

§Arguments
  • &Self - Target Cell<NodeId>.
  • NodeId - Mounted node handle.
Source§

impl NodeRefTarget for Cell<Option<NodeId>>

NodeRefTarget implementation storing a NodeId into a Cell<Option<NodeId>>.

Source§

fn bind_node_ref(&mut self, id: NodeId)

Sets self to Some(id).

§Arguments
  • &Self - Target Cell<Option<NodeId>>.
  • NodeId - Mounted node handle.
Source§

impl NodeRefTarget for Option<NodeId>

NodeRefTarget implementation storing a NodeId into an Option<NodeId>.

Source§

fn bind_node_ref(&mut self, id: NodeId)

Assigns Some(id) to self.

§Arguments
  • &Self - Target optional NodeId slot.
  • NodeId - Mounted node handle.
Source§

impl NodeRefTarget for Rc<Cell<NodeId>>

NodeRefTarget implementation storing a NodeId into a shared Rc<Cell<NodeId>>.

Source§

fn bind_node_ref(&mut self, id: NodeId)

Sets the shared cell value to id.

§Arguments
  • &Self - Target shared Cell<NodeId>.
  • NodeId - Mounted node handle.
Source§

impl NodeRefTarget for Rc<Cell<Option<NodeId>>>

NodeRefTarget implementation storing a NodeId into a shared Rc<Cell<Option<NodeId>>>.

Source§

fn bind_node_ref(&mut self, id: NodeId)

Sets the shared cell value to Some(id).

§Arguments
  • &Self - Target shared Cell<Option<NodeId>>.
  • NodeId - Mounted node handle.

Implementors§

Source§

impl NodeRefTarget for NodeId

NodeRefTarget implementation storing a NodeId directly into a mutable local binding.