fn created(&mut self, _ctx: &Context<MyMsg>, msg: MyMsg, _sender: Sender) {
        match msg {
            MyMsg::SetPassword(passwd) => {
                self.password = Some(passwd);

                // send back a result to sender
                // e.g. `sender.try_tell(Ok, None);`

                // transform behavior to match a state where the *password is set*
                transform!(self, UserActor::active);
            }
            MyMsg::Authenticate(_passwd) => {
                // `MyMsg::Authenticate` is invalid since no user password
                // has been set.
                // Signal that this is an error for the current state
                self.probe.as_ref().unwrap().0.event(ProbeMsg::Err);
            }
            MyMsg::Probe(probe) => {
                // Just because this is a test and probe message is a varient
                self.probe = Some(probe);
            }
        }
    }
/// Receive method for this actor when it is in a created state
/// i.e. password has not yet been set.

Receive method for this actor when it is in a created state
i.e. password has not yet been set.
Receive method for this actor when it is in a created state i . e . password has not yet been set .
fn created(&mut self, _ctx: &Context<MyMsg>, msg: MyMsg, _sender: Sender) {
        match msg {
            MyMsg::SetPassword(passwd) => {
                self.password = Some(passwd);
                // send back a result to sender
                // e.g. `sender.try_tell(Ok, None);`
                // transform behavior to match a state where the *password is set*
                transform!(self, UserActor::active);
            }
            MyMsg::Authenticate(_passwd) => {
                // `MyMsg::Authenticate` is invalid since no user password
                // has been set.
                // Signal that this is an error for the current state
                self.probe.as_ref().unwrap().0.event(ProbeMsg::Err);
            }
            MyMsg::Probe(probe) => {
                // Just because this is a test and probe message is a varient
                self.probe = Some(probe);
            }
        }
    }
fn created ( & mut self , _ctx : & Context < MyMsg > , msg : MyMsg , _sender : Sender ) { match msg { MyMsg :: SetPassword ( passwd ) => { self . password = Some ( passwd ) ; // send back a result to sender
 // e.g. `sender.try_tell(Ok, None);`
 // transform behavior to match a state where the *password is set*
 transform ! ( self UserActor active ) ; } MyMsg :: Authenticate ( _passwd ) => { // `MyMsg::Authenticate` is invalid since no user password
 // has been set.
 // Signal that this is an error for the current state
 self . probe . as_ref ( ) . unwrap ( ) . 0 . event ( ProbeMsg :: Err ) ; } MyMsg :: Probe ( probe ) => { // Just because this is a test and probe message is a varient
 self . probe = Some ( probe ) ; } } }
Receive method for this actor when it is in a created state
i.e.
Receive method for this actor when it is in a created state i . e .
&mut self
_ctx
&Context<MyMsg>
msg
MyMsg
_sender
Sender
&mut self
_ctx
&Context<MyMsg>
msg
MyMsg
_sender
Sender