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§
Sourcefn bind_node_ref(&mut self, id: NodeId)
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>.
impl NodeRefTarget for Cell<NodeId>
NodeRefTarget implementation storing a NodeId into a Cell<NodeId>.
Source§fn bind_node_ref(&mut self, id: NodeId)
fn bind_node_ref(&mut self, id: NodeId)
Source§impl NodeRefTarget for Cell<Option<NodeId>>
NodeRefTarget implementation storing a NodeId into a Cell<Option<NodeId>>.
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)
fn bind_node_ref(&mut self, id: NodeId)
Sets self to Some(id).
§Arguments
&Self- TargetCell<Option<NodeId>>.NodeId- Mounted node handle.
Source§impl NodeRefTarget for Option<NodeId>
NodeRefTarget implementation storing a NodeId into an Option<NodeId>.
impl NodeRefTarget for Option<NodeId>
NodeRefTarget implementation storing a NodeId into an Option<NodeId>.
Source§fn bind_node_ref(&mut self, id: NodeId)
fn bind_node_ref(&mut self, id: NodeId)
Assigns Some(id) to self.
§Arguments
&Self- Target optionalNodeIdslot.NodeId- Mounted node handle.
Source§impl NodeRefTarget for Rc<Cell<NodeId>>
NodeRefTarget implementation storing a NodeId into a shared Rc<Cell<NodeId>>.
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)
fn bind_node_ref(&mut self, id: NodeId)
Sets the shared cell value to id.
§Arguments
&Self- Target sharedCell<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>>>.
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)
fn bind_node_ref(&mut self, id: NodeId)
Sets the shared cell value to Some(id).
§Arguments
&Self- Target sharedCell<Option<NodeId>>.NodeId- Mounted node handle.
Implementors§
impl NodeRefTarget for NodeId
NodeRefTarget implementation storing a NodeId directly into a mutable local binding.