pub struct JournalObject {
pub id: ContentId,
pub bytes: Vec<u8>,
}Expand description
Immutable canonical bytes and their content identity.
Fields§
§id: ContentId§bytes: Vec<u8>Implementations§
Source§impl JournalObject
impl JournalObject
Sourcepub fn from_bytes(bytes: impl Into<Vec<u8>>) -> Self
pub fn from_bytes(bytes: impl Into<Vec<u8>>) -> Self
Constructs an object using the journal’s canonical byte identity.
Sourcepub fn verify(&self) -> Result<(), JournalError>
pub fn verify(&self) -> Result<(), JournalError>
Rejects bytes that do not match their claimed identity.
Trait Implementations§
Source§impl Clone for JournalObject
impl Clone for JournalObject
Source§fn clone(&self) -> JournalObject
fn clone(&self) -> JournalObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JournalObject
impl Debug for JournalObject
impl Eq for JournalObject
Source§impl PartialEq for JournalObject
impl PartialEq for JournalObject
impl StructuralPartialEq for JournalObject
Auto Trait Implementations§
impl Freeze for JournalObject
impl RefUnwindSafe for JournalObject
impl Send for JournalObject
impl Sync for JournalObject
impl Unpin for JournalObject
impl UnsafeUnpin for JournalObject
impl UnwindSafe for JournalObject
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