pub struct ServerManager { /* private fields */ }Expand description
Zentrale Verwaltung aller Server-Instanzen
Implementations§
Source§impl ServerManager
impl ServerManager
Sourcepub async fn load_servers(&self) -> Result<()>
pub async fn load_servers(&self) -> Result<()>
Lädt gespeicherte Server-Konfigurationen
Sourcepub async fn save_servers(&self) -> Result<()>
pub async fn save_servers(&self) -> Result<()>
Speichert Server-Konfigurationen
Sourcepub async fn create_server(&self, port: u16, mode: ServerMode) -> Result<String>
pub async fn create_server(&self, port: u16, mode: ServerMode) -> Result<String>
Erstellt einen neuen Server
Sourcepub async fn start_server(&self, server_id: &str) -> Result<()>
pub async fn start_server(&self, server_id: &str) -> Result<()>
Startet einen Server Startet einen Server
Sourcepub async fn stop_server(&self, server_id: &str) -> Result<()>
pub async fn stop_server(&self, server_id: &str) -> Result<()>
Stoppt einen Server
Sourcepub async fn delete_server(&self, server_id: &str) -> Result<()>
pub async fn delete_server(&self, server_id: &str) -> Result<()>
Löscht einen Server
Sourcepub async fn list_servers(&self) -> Vec<String>
pub async fn list_servers(&self) -> Vec<String>
Liste aller Server
Sourcepub async fn get_server_status(&self, server_id: &str) -> Result<String>
pub async fn get_server_status(&self, server_id: &str) -> Result<String>
Server-Status anzeigen
Sourcepub async fn stop_all_servers(&self) -> Result<()>
pub async fn stop_all_servers(&self) -> Result<()>
Alle Server stoppen (für Shutdown)
Sourcepub async fn find_free_port(&self, start_port: u16) -> u16
pub async fn find_free_port(&self, start_port: u16) -> u16
Suche freien Port
Trait Implementations§
Source§impl Clone for ServerManager
impl Clone for ServerManager
Auto Trait Implementations§
impl Freeze for ServerManager
impl !RefUnwindSafe for ServerManager
impl Send for ServerManager
impl Sync for ServerManager
impl Unpin for ServerManager
impl !UnwindSafe for ServerManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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