use crate::imports::*;
#[derive(Clone, Debug, Serialize, Deserialize)]
#[wasm_bindgen(inspectable)]
pub struct NodeDescriptor {
#[wasm_bindgen(getter_with_clone)]
pub uid: String,
#[wasm_bindgen(getter_with_clone)]
pub url: String,
}
impl Eq for NodeDescriptor {}
impl PartialEq for NodeDescriptor {
fn eq(&self, other: &Self) -> bool {
self.url == other.url
}
}
impl std::fmt::Display for NodeDescriptor {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.url)
}
}
impl NodeDescriptor {
pub fn url(&self) -> String {
self.url.clone()
}
}