Struct iroh_docs::sync::SignedEntry
source · pub struct SignedEntry { /* private fields */ }
Expand description
A signed entry.
Implementations§
source§impl SignedEntry
impl SignedEntry
sourcepub fn from_entry(
entry: Entry,
namespace: &NamespaceSecret,
author: &Author
) -> Self
pub fn from_entry( entry: Entry, namespace: &NamespaceSecret, author: &Author ) -> Self
Create a new signed entry by signing an entry with the namespace
and author
.
sourcepub fn from_parts(
namespace: &NamespaceSecret,
author: &Author,
key: impl AsRef<[u8]>,
record: Record
) -> Self
pub fn from_parts( namespace: &NamespaceSecret, author: &Author, key: impl AsRef<[u8]>, record: Record ) -> Self
Create a new signed entries from its parts.
sourcepub fn verify<S: PublicKeyStore>(&self, store: &S) -> Result<(), SignatureError>
pub fn verify<S: PublicKeyStore>(&self, store: &S) -> Result<(), SignatureError>
Verify the signatures on this entry.
sourcepub fn signature(&self) -> &EntrySignature
pub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
pub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the content [struct@Hash
] of the entry.
sourcepub fn content_len(&self) -> u64
pub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Entry>§
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
pub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn id(&self) -> &RecordIdentifier
pub fn id(&self) -> &RecordIdentifier
Get the RecordIdentifier
for this entry.
sourcepub fn namespace(&self) -> NamespaceId
pub fn namespace(&self) -> NamespaceId
Get the NamespaceId
of this entry.
Get the AuthorId
of this entry.
sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the content hash of the record.
sourcepub fn content_len(&self) -> u64
pub fn content_len(&self) -> u64
Get the content length of the record.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
pub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the [struct@Hash
] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
fn clone(&self) -> SignedEntry
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SignedEntry
impl Debug for SignedEntry
source§impl Deref for SignedEntry
impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
impl<'de> Deserialize<'de> for SignedEntry
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>,
source§impl From<SignedEntry> for Entry
impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
fn from(value: SignedEntry) -> Self
source§impl Ord for SignedEntry
impl Ord for SignedEntry
source§impl PartialEq for SignedEntry
impl PartialEq for SignedEntry
source§fn eq(&self, other: &SignedEntry) -> bool
fn eq(&self, other: &SignedEntry) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SignedEntry
impl PartialOrd for SignedEntry
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for SignedEntry
impl Serialize for SignedEntry
impl Eq for SignedEntry
impl StructuralPartialEq for SignedEntry
Auto Trait Implementations§
impl !Freeze for SignedEntry
impl RefUnwindSafe for SignedEntry
impl Send for SignedEntry
impl Sync for SignedEntry
impl Unpin for SignedEntry
impl UnwindSafe for SignedEntry
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.