pub struct ServerRegistry { /* private fields */ }Implementations§
Source§impl ServerRegistry
impl ServerRegistry
pub fn new() -> Result<Self>
Sourcepub fn with_fallback() -> Self
pub fn with_fallback() -> Self
Fallback constructor that never fails — uses temp dir if base_dir is unavailable
pub fn get_file_path(&self) -> &PathBuf
pub async fn load_servers( &self, ) -> Result<HashMap<String, PersistentServerInfo>>
pub async fn save_servers( &self, servers: &HashMap<String, PersistentServerInfo>, ) -> Result<()>
pub async fn update_server_status( &self, server_id: &str, status: ServerStatus, ) -> Result<HashMap<String, PersistentServerInfo>>
pub async fn set_auto_start( &self, server_id: &str, auto_start: bool, ) -> Result<HashMap<String, PersistentServerInfo>>
pub async fn add_server( &self, server_info: ServerInfo, ) -> Result<HashMap<String, PersistentServerInfo>>
pub async fn remove_server( &self, server_id: &str, ) -> Result<HashMap<String, PersistentServerInfo>>
pub async fn cleanup_servers( &self, cleanup_type: CleanupType, ) -> Result<(HashMap<String, PersistentServerInfo>, usize)>
pub fn get_auto_start_servers( &self, servers: &HashMap<String, PersistentServerInfo>, ) -> Vec<PersistentServerInfo>
pub async fn cleanup_server_directory( &self, server_name: &str, port: u16, ) -> Result<()>
pub fn list_www_directories(&self) -> Result<Vec<PathBuf>>
Auto Trait Implementations§
impl !Freeze for ServerRegistry
impl !RefUnwindSafe for ServerRegistry
impl Send for ServerRegistry
impl Sync for ServerRegistry
impl Unpin for ServerRegistry
impl UnsafeUnpin for ServerRegistry
impl !UnwindSafe for ServerRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more