pub struct ServerStatus {
pub server_id: String,
pub state: ServerState,
pub last_checked: Instant,
pub uptime: Option<Duration>,
pub last_crash_time: Option<Instant>,
pub crash_count: u32,
}
Fields§
§server_id: String
§state: ServerState
§last_checked: Instant
§uptime: Option<Duration>
§last_crash_time: Option<Instant>
§crash_count: u32
Implementations§
Source§impl ServerStatus
impl ServerStatus
pub fn new(server_id: &str) -> Self
pub fn update_state(&mut self, new_state: ServerState)
pub fn is_crashed(&self) -> bool
pub fn is_running(&self) -> bool
Trait Implementations§
Source§impl Clone for ServerStatus
impl Clone for ServerStatus
Source§fn clone(&self) -> ServerStatus
fn clone(&self) -> ServerStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ServerStatus
impl Debug for ServerStatus
Source§impl From<ApiServerStatus> for ServerStatus
impl From<ApiServerStatus> for ServerStatus
Source§fn from(api_status: ApiServerStatus) -> Self
fn from(api_status: ApiServerStatus) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ServerStatus
impl RefUnwindSafe for ServerStatus
impl Send for ServerStatus
impl Sync for ServerStatus
impl Unpin for ServerStatus
impl UnwindSafe for ServerStatus
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