pub struct Entry { /* private fields */ }Expand description
Entry of an append-only log based on Bamboo specification.
Bamboo entries are the main data type of p2panda. They describe the actual data in the p2p network and are shared between nodes. Entries are organised in a distributed, single-writer append-only log structure, created and signed by holders of private keys and stored inside the node’s database.
Entries are separated from the actual (off-chain) data to be able to delete application data
without loosing the integrity of the log. Payload data is formatted as “operations” in p2panda.
Each entry only holds a hash of the operation payload, this is why an [Operation] instance is
required during entry signing.
It is not possible to directly create an Entry instance without validation, use the
EntryBuilder to programmatically create and sign one or decode it from bytes via the
EncodedEntry struct.
Trait Implementations§
Source§impl AsEntry for Entry
impl AsEntry for Entry
Source§fn public_key(&self) -> &PublicKey
fn public_key(&self) -> &PublicKey
Returns public key of entry.
Source§fn payload_size(&self) -> u64
fn payload_size(&self) -> u64
Returns payload size of operation.
Source§fn payload_hash(&self) -> &Hash
fn payload_hash(&self) -> &Hash
Returns payload hash of operation.
Source§fn seq_num_backlink(&self) -> Option<SeqNum>
fn seq_num_backlink(&self) -> Option<SeqNum>
Source§fn seq_num_skiplink(&self) -> Option<SeqNum>
fn seq_num_skiplink(&self) -> Option<SeqNum>
Source§fn is_skiplink_required(&self) -> bool
fn is_skiplink_required(&self) -> bool
impl Eq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more