#[non_exhaustive]pub struct BundleIndex {
pub schema: Option<String>,
pub rite_bundle: u32,
pub kind: BundleKind,
pub fingerprint: Sha256Digest,
pub files: Vec<BundleFile>,
}Expand description
The index at the root of a bundle.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.schema: Option<String>URL of the JSON Schema the index was written against
(BUNDLE_SCHEMA). Editors read it; a reader ignores it.
rite_bundle: u32Bundle format version (BUNDLE_FORMAT). A reader refuses a value it
does not know.
kind: BundleKindWhether this is the complete record or a disclosure derived from it,
written as kind, with a disclosure’s threshold beside it.
fingerprint: Sha256DigestFingerprint of the transcript in the bundle. A convenience for indexing; a verifier recomputes it from the transcript.
files: Vec<BundleFile>Every file in the bundle other than the index, in a stable order.
Implementations§
Source§impl BundleIndex
impl BundleIndex
Sourcepub fn complete(fingerprint: Sha256Digest, files: Vec<BundleFile>) -> Self
pub fn complete(fingerprint: Sha256Digest, files: Vec<BundleFile>) -> Self
An index for a complete bundle.
Sourcepub fn disclosure(
fingerprint: Sha256Digest,
threshold: Level,
files: Vec<BundleFile>,
) -> Self
pub fn disclosure( fingerprint: Sha256Digest, threshold: Level, files: Vec<BundleFile>, ) -> Self
An index for a disclosure: every line above threshold is withheld.
Trait Implementations§
Source§impl Clone for BundleIndex
impl Clone for BundleIndex
Source§impl Debug for BundleIndex
impl Debug for BundleIndex
Source§impl<'de> Deserialize<'de> for BundleIndex
impl<'de> Deserialize<'de> for BundleIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BundleIndex
Source§impl PartialEq for BundleIndex
impl PartialEq for BundleIndex
Source§impl Serialize for BundleIndex
impl Serialize for BundleIndex
impl StructuralPartialEq for BundleIndex
Auto Trait Implementations§
impl Freeze for BundleIndex
impl RefUnwindSafe for BundleIndex
impl Send for BundleIndex
impl Sync for BundleIndex
impl Unpin for BundleIndex
impl UnsafeUnpin for BundleIndex
impl UnwindSafe for BundleIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.