pub struct Entry(_);
Expand description
Holds serialized data associated with a parent document and a key string.
An Entry holds a piece of serialized data, which may be deserialized by calling
deserialize
.
Implementations§
source§impl Entry
impl Entry
sourcepub fn find_hashes(&self) -> Vec<Hash>
pub fn find_hashes(&self) -> Vec<Hash>
Find all hashes in this entry and return them.
sourcepub fn schema_hash(&self) -> &Hash
pub fn schema_hash(&self) -> &Hash
sourcepub fn signer(&self) -> Option<&Identity>
pub fn signer(&self) -> Option<&Identity>
Get the Identity of the signer of this entry, if the entry is signed.
sourcepub fn hash(&self) -> &Hash
pub fn hash(&self) -> &Hash
Get the hash of the complete entry. This can change if the entry is signed again with the
sign
function.
sourcepub fn deserialize<'de, D: Deserialize<'de>>(&'de self) -> Result<D>
pub fn deserialize<'de, D: Deserialize<'de>>(&'de self) -> Result<D>
Deserialize the entry’s contained data into a value.
sourcepub fn compression(self, setting: Option<u8>) -> Self
pub fn compression(self, setting: Option<u8>) -> Self
Override the default compression settings. None
will disable compression. Some(level)
will compress with the provided level as the setting for the algorithm.
sourcepub fn sign(self, key: &IdentityKey) -> Result<Self>
pub fn sign(self, key: &IdentityKey) -> Result<Self>
Sign the entry, or or replace the existing signature if one exists already. Fails if the signature would grow the entry size beyond the maximum allowed. In the event of a failure. the entry is unmodified.