pub struct EntryPayload<'a> {
pub segment_id: SegmentId,
pub segment_len: u32,
pub dict_id: Option<SegmentId>,
pub plain_len: u64,
pub created_at: i64,
pub roster_version: u64,
pub signer: PublicKey,
pub files: Vec<EntryFile<'a>>,
pub signature: Signature,
}Expand description
The signed content of a record. EntryPayload::signed_bytes is the part the signature
covers, after the caller’s domain-separated prefix.
Fields§
§segment_id: SegmentId§segment_len: u32§dict_id: Option<SegmentId>§plain_len: u64Sum of the file sizes.
created_at: i64§roster_version: u64§signer: PublicKey§files: Vec<EntryFile<'a>>§signature: SignatureImplementations§
Source§impl<'a> EntryPayload<'a>
impl<'a> EntryPayload<'a>
Sourcepub fn signed_bytes(&self, limits: &Limits) -> Result<Vec<u8>>
pub fn signed_bytes(&self, limits: &Limits) -> Result<Vec<u8>>
Every byte before the signature.
Sourcepub fn encode(&self, limits: &Limits) -> Result<Vec<u8>>
pub fn encode(&self, limits: &Limits) -> Result<Vec<u8>>
The plaintext of the record: signed bytes, signature, zero padding so that the sealed record is a multiple of 256 bytes.
pub fn decode(bytes: &'a [u8], limits: &Limits) -> Result<Self>
Trait Implementations§
Source§impl<'a> Clone for EntryPayload<'a>
impl<'a> Clone for EntryPayload<'a>
Source§impl<'a> Debug for EntryPayload<'a>
impl<'a> Debug for EntryPayload<'a>
impl<'a> Eq for EntryPayload<'a>
Source§impl<'a> PartialEq for EntryPayload<'a>
impl<'a> PartialEq for EntryPayload<'a>
impl<'a> StructuralPartialEq for EntryPayload<'a>
Auto Trait Implementations§
impl<'a> Freeze for EntryPayload<'a>
impl<'a> RefUnwindSafe for EntryPayload<'a>
impl<'a> Send for EntryPayload<'a>
impl<'a> Sync for EntryPayload<'a>
impl<'a> Unpin for EntryPayload<'a>
impl<'a> UnsafeUnpin for EntryPayload<'a>
impl<'a> UnwindSafe for EntryPayload<'a>
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