rs-zero 0.1.1

Rust-first microservice framework inspired by go-zero engineering practices
Documentation
use std::net::SocketAddr;

/// Common service identity used by REST and RPC runtimes.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ServiceInfo {
    /// Logical service name.
    pub name: String,
    /// Bound address.
    pub addr: SocketAddr,
}

impl ServiceInfo {
    /// Creates a service identity.
    pub fn new(name: impl Into<String>, addr: SocketAddr) -> Self {
        Self {
            name: name.into(),
            addr,
        }
    }
}