pub type BehaviourPtr = ByAddress<Rc<RefCell<dyn Behaviour>>>;Aliased Type§
#[repr(transparent)]pub struct BehaviourPtr(pub Rc<RefCell<dyn Behaviour>>);Tuple Fields§
§0: Rc<RefCell<dyn Behaviour>>Trait Implementations§
Source§impl From<BasicBehaviour> for BehaviourPtr
impl From<BasicBehaviour> for BehaviourPtr
Source§fn from(b: BasicBehaviour) -> Self
fn from(b: BasicBehaviour) -> Self
Convert from a BasicBehaviour into a BehaviourPtr.
This consumes the BasicBehaviour.
§Arguments
b: The BasicBehaviour to convert.
§Returns
The BehaviourPtr.
§Examples
use belief_spread::{BasicBehaviour, BehaviourPtr};
let b = BasicBehaviour::new("Behaviour 1".to_string());
let b_ptr = BehaviourPtr::from(b);use belief_spread::{BasicBehaviour, BehaviourPtr};
let b = BasicBehaviour::new("Behaviour 1".to_string());
let b_ptr: BehaviourPtr = b.into();