This commit is contained in:
junxiang Mu
2024-11-11 17:33:25 +08:00
parent 4ca8a7ffcf
commit fe50ccd39f
25 changed files with 1413 additions and 112 deletions
+10
View File
@@ -109,6 +109,16 @@ impl Endpoints {
pub fn into_inner(self) -> Vec<Endpoint> {
self.0
}
// GetString - returns endpoint string of i-th endpoint (0-based),
// and empty string for invalid indexes.
pub fn get_string(&self, i: usize) -> String {
if i < 0 || i >= self.0.len() {
return "".to_string();
}
self.0[i].to_string()
}
}
#[derive(Debug)]