Allow schemes to be listed
This commit is contained in:
parent
d18bf07f3e
commit
c907222657
3 changed files with 59 additions and 14 deletions
|
@ -71,6 +71,14 @@ impl SchemeList {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> ::collections::btree_map::Iter<usize, Arc<Box<Scheme + Send + Sync>>> {
|
||||
self.map.iter()
|
||||
}
|
||||
|
||||
pub fn iter_name(&self) -> ::collections::btree_map::Iter<Box<[u8]>, usize> {
|
||||
self.names.iter()
|
||||
}
|
||||
|
||||
/// Get the nth scheme.
|
||||
pub fn get(&self, id: usize) -> Option<&Arc<Box<Scheme + Send + Sync>>> {
|
||||
self.map.get(&id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue