pub struct ServerInfo {
pub id: ServerId,
pub name: String,
pub address: String,
pub region_coord: RegionCoordinate,
pub bounds: RegionBounds,
pub center: WorldCoordinate,
pub capacity: u32,
pub version: String,
}Expand description
Basic server information for registration and discovery.
Fields§
§id: ServerIdUnique server identifier
name: StringHuman-readable server name
address: StringServer address (host:port)
region_coord: RegionCoordinateRegion coordinate in the world grid
bounds: RegionBoundsSpatial bounds of this server’s region
center: WorldCoordinateCenter point of the region in world coordinates
capacity: u32Maximum number of connections this server can handle
version: StringServer version string
Implementations§
Source§impl ServerInfo
impl ServerInfo
Sourcepub fn new(
name: String,
address: String,
region_coord: RegionCoordinate,
bounds: RegionBounds,
capacity: u32,
) -> Self
pub fn new( name: String, address: String, region_coord: RegionCoordinate, bounds: RegionBounds, capacity: u32, ) -> Self
Creates new server info with the given parameters.
Trait Implementations§
Source§impl Clone for ServerInfo
impl Clone for ServerInfo
Source§fn clone(&self) -> ServerInfo
fn clone(&self) -> ServerInfo
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 ServerInfo
impl Debug for ServerInfo
Source§impl<'de> Deserialize<'de> for ServerInfo
impl<'de> Deserialize<'de> for ServerInfo
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 ServerInfo
impl RefUnwindSafe for ServerInfo
impl Send for ServerInfo
impl Sync for ServerInfo
impl Unpin for ServerInfo
impl UnwindSafe for ServerInfo
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