pub struct ServerStatFile {
pub version: String,
pub saved_at: u64,
pub servers: Vec<ServerStatSnapshot>,
}Expand description
Container for serialized server statistics file.
This is the top-level structure saved to disk when persisting server statistics. It includes metadata about when the file was saved and the version format.
§Example JSON structure
{
"version": "1.0",
"saved_at": 1700000000,
"servers": [
{
"host": "mirror.example.com",
"download_speed": 5000000,
...
}
]
}Fields§
§version: StringFile format version (currently “1.0”)
saved_at: u64Unix timestamp when the file was saved
servers: Vec<ServerStatSnapshot>List of server statistics
Trait Implementations§
Source§impl Clone for ServerStatFile
impl Clone for ServerStatFile
Source§fn clone(&self) -> ServerStatFile
fn clone(&self) -> ServerStatFile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServerStatFile
impl Debug for ServerStatFile
Source§impl<'de> Deserialize<'de> for ServerStatFile
impl<'de> Deserialize<'de> for ServerStatFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ServerStatFile
impl RefUnwindSafe for ServerStatFile
impl Send for ServerStatFile
impl Sync for ServerStatFile
impl Unpin for ServerStatFile
impl UnsafeUnpin for ServerStatFile
impl UnwindSafe for ServerStatFile
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