/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
pubtrait AsQuery<const W: usize> { /// Hash this item to a homogeneous equation (s, a) such that /// (1) s is uniform in {0, 1, ..., m-1}, /// (2) a satisfies the alignment requirement (a\[0\] & 1 == 1) but is otherwise uniformly random, fn as_query(&self, m: usize) -> Equation<W>;
/// The block that this item belongs in. fn block(&self) -> &[u8];
/// A unique identifier for this item. If this item cannot be inserted into the linear system, /// then we will store its `included()` status in a secondary retrieval mechanism keyed by /// `discriminant()`. fn discriminant(&self) -> &[u8];
/// A Filterable is an item that can be inserted into a RibbonBuilder. pubtrait Filterable<const W: usize>: AsQuery<W> { /// Whether this item should be included in an exact filter. fn included(&self) -> bool { false
}
}
/// A Queryable is an item that can be passed to Clubcard::contains. pubtrait Queryable<const W: usize>: AsQuery<W> { /// The universe metadata is stored in the Clubcard and passed to Queryable::in_universe before /// a query is performed. The query is performed only if Queryable::in_universe returns true. type UniverseMetadata;
/// The partition metadata is stored in the Clubcard and is used to construct a Queryable with /// the correct block identifier. For example, a clubcard that encodes a subset of the integers /// {0, ..., n} might have a set of named non-overlapping intervals as its partition metadata: /// { "a": {0, ..., 32}, "b": {33, ..., 100}, ... }. To perform a membership test for 37, /// the user would use the partition metadata to construct a Queryable with block = "b" and /// discriminant = 37. type PartitionMetadata;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.