From d183e12a3231e4c505f5f2cf48b6c1f881ad258a Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 6 Feb 2020 14:15:10 +0100 Subject: 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. --- store/src/backend/mod.rs | 10 +++++----- store/src/lib.rs | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'store') 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::())); Promise::ok(()) @@ -1167,19 +1167,19 @@ impl node::mapping_iter::Server for MappingIterServer { } } -struct BindingIterServer { +struct BundleIterServer { c: Rc, mapping_id: ID, n: ID, } -impl BindingIterServer { +impl BundleIterServer { fn new(c: Rc, 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 { + pub fn iter(&self) -> Result { 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>, iter: node::binding_iter::Client, } -impl Iterator for BindingIter { +impl Iterator for BundleIter { type Item = (String, openpgp::Fingerprint, Binding); fn next(&mut self) -> Option { -- cgit v1.2.3