fn active(&mut self, _ctx: &Context<MyMsg>, msg: MyMsg, _sender: Sender) {
        match msg {
            MyMsg::Authenticate(_passwd) => {
                // send back an authentication result to sender
                // e.g. `sender.try_tell(Ok, None);`

                // signal that this is correct
                self.probe.as_ref().unwrap().0.event(ProbeMsg::Ok);
            }
            MyMsg::SetPassword(passwd) => {
                // set a new password
                self.password = Some(passwd);
            }
            _ => {
                // ignore probe
            }
        }
    }
/// Receive method for this actor when a password has been set
/// and the user account is now active.

Receive method for this actor when a password has been set
and the user account is now active.
Receive method for this actor when a password has been set and the user account is now active .
fn active(&mut self, _ctx: &Context<MyMsg>, msg: MyMsg, _sender: Sender) {
        match msg {
            MyMsg::Authenticate(_passwd) => {
                // send back an authentication result to sender
                // e.g. `sender.try_tell(Ok, None);`
                // signal that this is correct
                self.probe.as_ref().unwrap().0.event(ProbeMsg::Ok);
            }
            MyMsg::SetPassword(passwd) => {
                // set a new password
                self.password = Some(passwd);
            }
            _ => {
                // ignore probe
            }
        }
    }
fn active ( & mut self , _ctx : & Context < MyMsg > , msg : MyMsg , _sender : Sender ) { match msg { MyMsg :: Authenticate ( _passwd ) => { // send back an authentication result to sender
 // e.g. `sender.try_tell(Ok, None);`
 // signal that this is correct
 self . probe . as_ref ( ) . unwrap ( ) . 0 . event ( ProbeMsg :: Ok ) ; } MyMsg :: SetPassword ( passwd ) => { // set a new password
 self . password = Some ( passwd ) ; } _ => { // ignore probe
 } } }
Receive method for this actor when a password has been set
and the user account is now active.
Receive method for this actor when a password has been set and the user account is now active .
&mut self
_ctx
&Context<MyMsg>
msg
MyMsg
_sender
Sender
&mut self
_ctx
&Context<MyMsg>
msg
MyMsg
_sender
Sender