diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-02-06 14:15:10 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-02-06 14:15:10 +0100 |
commit | d183e12a3231e4c505f5f2cf48b6c1f881ad258a (patch) | |
tree | affb4e4c0acc3bce3d14adba627f5193c166bc32 /store | |
parent | c8eb94375a38e5606441a9e86d402442662ffb02 (diff) |
openpgp: Rename ComponentBinding to ComponentBundle, etc.
- Likewise KeyBinding, UserIDBinding, UserAttributeBinding,
UnknownBinding, etc.
- Reason: a self-signature on a component is a binding, but
revocations and TPSes are not bindings.
- Consistently call collections of components and associated
signatures bundles now. Likewise for fields, methods.
- Fixes #425.
Diffstat (limited to 'store')
-rw-r--r-- | store/src/backend/mod.rs | 10 | ||||
-rw-r--r-- | store/src/lib.rs | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/store/src/backend/mod.rs b/store/src/backend/mod.rs index 412011b1..8141a965 100644 --- a/store/src/backend/mod.rs +++ b/store/src/backend/mod.rs @@ -414,7 +414,7 @@ impl node::mapping::Server for MappingServer { mut results: node::mapping::IterResults) -> Promise<(), capnp::Error> { bind_results!(results); - let iter = BindingIterServer::new(self.c.clone(), self.id); + let iter = BundleIterServer::new(self.c.clone(), self.id); pry!(pry!(results.get().get_result()).set_ok( node::binding_iter::ToClient::new(iter).into_client::<capnp_rpc::Server>())); Promise::ok(()) @@ -1167,19 +1167,19 @@ impl node::mapping_iter::Server for MappingIterServer { } } -struct BindingIterServer { +struct BundleIterServer { c: Rc<Connection>, mapping_id: ID, n: ID, } -impl BindingIterServer { +impl BundleIterServer { fn new(c: Rc<Connection>, mapping_id: ID) -> Self { - BindingIterServer{c: c, mapping_id: mapping_id, n: ID::null()} + BundleIterServer{c: c, mapping_id: mapping_id, n: ID::null()} } } -impl node::binding_iter::Server for BindingIterServer { +impl node::binding_iter::Server for BundleIterServer { fn next(&mut self, _: node::binding_iter::NextParams, mut results: node::binding_iter::NextResults) diff --git a/store/src/lib.rs b/store/src/lib.rs index 229bc9a2..5a1ea2d9 100644 --- a/store/src/lib.rs +++ b/store/src/lib.rs @@ -542,10 +542,10 @@ impl Mapping { } /// Lists all bindings. - pub fn iter(&self) -> Result<BindingIter> { + pub fn iter(&self) -> Result<BundleIter> { let request = self.mapping.iter_request(); let iter = make_request!(self.core.borrow_mut(), request)?; - Ok(BindingIter{core: self.core.clone(), iter: iter}) + Ok(BundleIter{core: self.core.clone(), iter: iter}) } /// Lists all log entries related to this mapping. @@ -1072,12 +1072,12 @@ impl Iterator for MappingIter { } /// Iterates over bindings in a mapping. -pub struct BindingIter { +pub struct BundleIter { core: Rc<RefCell<Core>>, iter: node::binding_iter::Client, } -impl Iterator for BindingIter { +impl Iterator for BundleIter { type Item = (String, openpgp::Fingerprint, Binding); fn next(&mut self) -> Option<Self::Item> { |