ray-dashboard-sdk 0.4.0

A simple Rust client for the Ray Dashboard REST API.
Documentation
use core::fmt;

use crate::utils::constants::RAY_PKG_PROTOCOL;

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PackageUri {
    pub protocol: String,
    pub name: String,
}

impl PackageUri {
    pub fn new(name: String) -> Self {
        Self {
            protocol: RAY_PKG_PROTOCOL.to_string(),
            name,
        }
    }
}

impl fmt::Display for PackageUri {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}://{}", self.protocol, self.name)
    }
}