fn from_registry() -> Addr<Self> {
        let sys = System::current();

        let mut sreg = SREG.lock();
        let reg = sreg
            .entry(sys.id())
            .or_insert_with(|| SystemRegistry::new(sys.arbiter().clone()));

        if let Some(addr) = reg.registry.get(&TypeId::of::<Self>()) {
            if let Some(addr) = addr.downcast_ref::<Addr<Self>>() {
                return addr.clone();
            }
        }

        let addr = Self::start_service(System::current().arbiter());
        reg.registry
            .insert(TypeId::of::<Self>(), Box::new(addr.clone()));
        addr
    }
/// Get actor's address from system registry
Get actor's address from system registry
Get actor ' s address from system registry
fn from_registry() -> Addr<Self> {
        let sys = System::current();
        let mut sreg = SREG.lock();
        let reg = sreg
            .entry(sys.id())
            .or_insert_with(|| SystemRegistry::new(sys.arbiter().clone()));
        if let Some(addr) = reg.registry.get(&TypeId::of::<Self>()) {
            if let Some(addr) = addr.downcast_ref::<Addr<Self>>() {
                return addr.clone();
            }
        }
        let addr = Self::start_service(System::current().arbiter());
        reg.registry
            .insert(TypeId::of::<Self>(), Box::new(addr.clone()));
        addr
    }
fn from_registry ( ) -> Addr < Self > { let sys = System :: current ( ) ; let mut sreg = SREG . lock ( ) ; let reg = sreg . entry ( sys . id ( ) ) . or_insert_with ( | | SystemRegistry :: new ( sys . arbiter ( ) . clone ( ) ) ) ; if let Some ( addr ) = reg . registry . get ( & TypeId :: of :: < Self > ( ) ) { if let Some ( addr ) = addr . downcast_ref :: < Addr < Self > > ( ) { return addr . clone ( ) ; } } let addr = Self :: start_service ( System :: current ( ) . arbiter ( ) ) ; reg . registry . insert ( TypeId :: of :: < Self > ( ) , Box :: new ( addr . clone ( ) ) ) ; addr }
Get actor's address from system registry
Get actor ' s address from system registry