pub struct NodeID(/* private fields */);Expand description
Implementations§
Source§impl NodeID
impl NodeID
Sourcepub const fn from_node(node: &Node<'_, '_>) -> NodeID
pub const fn from_node(node: &Node<'_, '_>) -> NodeID
A const version of NodeID::from::<&Node<'_, '_>>
Source§impl NodeID
impl NodeID
Sourcepub const fn try_from_name(name: &str) -> Option<NodeID>
pub const fn try_from_name(name: &str) -> Option<NodeID>
A const version of NodeID::try_from::<&str>
Trait Implementations§
impl Eq for NodeID
Source§impl From<&Node<'_, '_>> for NodeID
impl From<&Node<'_, '_>> for NodeID
Source§fn from(value: &Node<'_, '_>) -> NodeID
fn from(value: &Node<'_, '_>) -> NodeID
let identifier_one = Identifier::SimpleIdentifier((
"my_signal",
Metadata::default()
));
let node_one: Node<'_, '_> = (&identifier_one).into();
let node_id_one: NodeID = (&node_one).into();
let identifier_two = Identifier::SimpleIdentifier((
"my_other_signal",
Metadata::default()
));
let node_two: Node<'_, '_> = (&identifier_two).into();
let node_id_two: NodeID = (&node_two).into();
assert_eq!(node_id_one, node_id_two);Source§impl From<NodeID> for &'static str
impl From<NodeID> for &'static str
let identifier = Identifier::SimpleIdentifier((
"my_signal",
Metadata::default()
));
let node: Node<'_, '_> = (&identifier).into();
let node_id: NodeID = (&node).into();
let node_id_name: &'static str = node_id.into();
assert_eq!(node_id_name, "Identifier");impl StructuralPartialEq for NodeID
Source§impl TryFrom<&str> for NodeID
impl TryFrom<&str> for NodeID
let identifier = Identifier::SimpleIdentifier((
"my_signal",
Metadata::default()
));
let node: Node<'_, '_> = (&identifier).into();
let node_id: NodeID = (&node).into();
let identifier_node_id: NodeID = "Identifier".try_into().unwrap();
assert_eq!(node_id, identifier_node_id);Auto Trait Implementations§
impl Freeze for NodeID
impl RefUnwindSafe for NodeID
impl Send for NodeID
impl Sync for NodeID
impl Unpin for NodeID
impl UnsafeUnpin for NodeID
impl UnwindSafe for NodeID
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