pub struct Metadata {
pub file_name: String,
pub file_path: PathBuf,
pub num_entries: u64,
pub last_offset: usize,
pub parent_hash: Vec<u8>,
}
Expand description
Struct representing the metadata of the ledger.
Fields§
§file_name: String
The name of the file associated with the metadata.
file_path: PathBuf
The path where the file is located.
num_entries: u64
The number of entries in the ledger.
last_offset: usize
The last offset in the file.
parent_hash: Vec<u8>
The hash of the parent metadata.
Implementations§
Trait Implementations§
source§impl BorshDeserialize for Metadata
impl BorshDeserialize for Metadata
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for Metadata
impl BorshSerialize for Metadata
Auto Trait Implementations§
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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