pub struct Link {
pub to_key: String,
pub dialogue: String,
}
Fields§
§to_key: String
A key to the node being linked. This should be identical to an existing Node#key
.
dialogue: String
The dialogue used to describe this link.
Implementations§
Source§impl Link
impl Link
Sourcepub fn link<T>(from: &mut Node, to: &Node, dialogue: T)
pub fn link<T>(from: &mut Node, to: &Node, dialogue: T)
Link two Node
s together by creating a Link
with descriptor dialogue.
§Arguments
from
- ANode
which will prompt the linkto
- ANode
which will be the target of the linkdialogue
- A string type that holds associated dialogue
§Examples
use convo::{Node, Link};
let mut node1 = Node::new("root", "I am the root node!");
let node2 = Node::new("end", "I am the last node!");
Link::link(&mut node1, &node2, "I link start to end!");
Trait Implementations§
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnwindSafe for Link
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.