pub struct ApiServerRegistration {
pub name: String,
pub address: String,
pub region_coord: RegionCoordinate,
pub center: WorldCoordinate,
pub bounds: f64,
pub capacity: u32,
pub version: String,
pub metadata: HashMap<String, Value>,
}Expand description
Simplified server registration for REST API. This is what Horizon sends to Atlas when registering.
Fields§
§name: StringServer name
address: StringServer address (host:port)
region_coord: RegionCoordinateRegion X coordinate
center: WorldCoordinateCenter point of the region
bounds: f64Region bounds (half-extent)
capacity: u32Maximum capacity
version: StringServer version
metadata: HashMap<String, Value>Additional metadata
Implementations§
Source§impl ApiServerRegistration
impl ApiServerRegistration
Sourcepub fn from_bounds(
name: String,
address: String,
region_coord: RegionCoordinate,
bounds: &RegionBounds,
capacity: u32,
) -> Self
pub fn from_bounds( name: String, address: String, region_coord: RegionCoordinate, bounds: &RegionBounds, capacity: u32, ) -> Self
Create from RegionBounds
Trait Implementations§
Source§impl Clone for ApiServerRegistration
impl Clone for ApiServerRegistration
Source§fn clone(&self) -> ApiServerRegistration
fn clone(&self) -> ApiServerRegistration
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 ApiServerRegistration
impl Debug for ApiServerRegistration
Source§impl<'de> Deserialize<'de> for ApiServerRegistration
impl<'de> Deserialize<'de> for ApiServerRegistration
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 ApiServerRegistration
impl RefUnwindSafe for ApiServerRegistration
impl Send for ApiServerRegistration
impl Sync for ApiServerRegistration
impl Unpin for ApiServerRegistration
impl UnsafeUnpin for ApiServerRegistration
impl UnwindSafe for ApiServerRegistration
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