pub struct NetworksRegistry {
pub schema: String,
pub description: String,
pub networks: Vec<Network>,
pub title: String,
pub updated_at: String,
pub version: String,
}
Fields§
§schema: String
Reference to this schema file
description: String
§networks: Vec<Network>
List of networks
title: String
§updated_at: String
Date and time of the last update
version: String
Version of the registry
Implementations§
Source§impl NetworksRegistry
impl NetworksRegistry
Sourcepub fn get_latest_version_url() -> String
pub fn get_latest_version_url() -> String
Returns the URL for the latest version of the networks registry
Sourcepub fn get_exact_version_url(version: &str) -> String
pub fn get_exact_version_url(version: &str) -> String
Returns the URL for a specific version of the networks registry
§Arguments
version
- The version string to fetch (e.g., “v0.5.0”)
Sourcepub async fn from_latest_version() -> Result<Self, Error>
pub async fn from_latest_version() -> Result<Self, Error>
Fetches and creates a NetworksRegistry from the latest compatible version available online Library version 0.5.x will use the latest registry version 0.5.y even if 0.6.z is available
§Errors
Returns an error if the network request fails or the response contains invalid data
Sourcepub async fn from_exact_version(version: &str) -> Result<Self, Error>
pub async fn from_exact_version(version: &str) -> Result<Self, Error>
Sourcepub fn get_network_by_id<'a>(&'a self, id: &str) -> Option<&'a Network>
👎Deprecated since 0.7.0: Use get_network_by_graph_id instead
pub fn get_network_by_id<'a>(&'a self, id: &str) -> Option<&'a Network>
Sourcepub fn get_network_by_alias<'a>(&'a self, alias: &str) -> Option<&'a Network>
👎Deprecated since 0.7.0: Use get_network_by_graph_id instead
pub fn get_network_by_alias<'a>(&'a self, alias: &str) -> Option<&'a Network>
Sourcepub fn get_network_by_graph_id<'a>(&'a self, id: &str) -> Option<&'a Network>
pub fn get_network_by_graph_id<'a>(&'a self, id: &str) -> Option<&'a Network>
Trait Implementations§
Source§impl Clone for NetworksRegistry
impl Clone for NetworksRegistry
Source§fn clone(&self) -> NetworksRegistry
fn clone(&self) -> NetworksRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NetworksRegistry
impl Debug for NetworksRegistry
Source§impl<'de> Deserialize<'de> for NetworksRegistry
impl<'de> Deserialize<'de> for NetworksRegistry
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
Source§impl FromStr for NetworksRegistry
impl FromStr for NetworksRegistry
Auto Trait Implementations§
impl Freeze for NetworksRegistry
impl RefUnwindSafe for NetworksRegistry
impl Send for NetworksRegistry
impl Sync for NetworksRegistry
impl Unpin for NetworksRegistry
impl UnwindSafe for NetworksRegistry
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