fn require_initialized(&self) -> Result<Arc<Config>> {
        match &*self.stage.read() {
            ServerStage::Startup { .. } => Err(Error::IdNotSet),
            ServerStage::InitReady { config, .. } | ServerStage::Initializing { config, .. } => {
                Err(Error::ServerNotInitialized {
                    server_id: config.server_id(),
                })
            }
            ServerStage::Initialized { config, .. } => Ok(Arc::clone(config)),
        }
    }
/// Require that server is loaded. Databases are loaded and server is ready to read/write.
Require that server is loaded. Databases are loaded and server is ready to read/write.
Require that server is loaded . Databases are loaded and server is ready to read / write .
fn require_initialized(&self) -> Result<Arc<Config>> {
        match &*self.stage.read() {
            ServerStage::Startup { .. } => Err(Error::IdNotSet),
            ServerStage::InitReady { config, .. } | ServerStage::Initializing { config, .. } => {
                Err(Error::ServerNotInitialized {
                    server_id: config.server_id(),
                })
            }
            ServerStage::Initialized { config, .. } => Ok(Arc::clone(config)),
        }
    }
fn require_initialized ( & self ) -> Result < Arc < Config > > { match & * self . stage . read ( ) { ServerStage :: Startup { .. } => Err ( Error :: IdNotSet ) , ServerStage :: InitReady { config , .. } | ServerStage :: Initializing { config , .. } => { Err ( Error :: ServerNotInitialized { server_id : config . server_id ( ) , } ) } ServerStage :: Initialized { config , .. } => Ok ( Arc :: clone ( config ) ) , } }
Require that server is loaded.
Require that server is loaded .
&self
&self