pub struct Container {
pub header: ContainerHeader,
pub chunks: MediumVec<ChunkId>,
}
Fields§
§header: ContainerHeader
§chunks: MediumVec<ChunkId>
Implementations§
Source§impl Container
impl Container
pub fn container_id(&self) -> ContainerId
Trait Implementations§
Source§impl ConsensusCommit for Container
impl ConsensusCommit for Container
Source§type Commitment = ContainerId
type Commitment = ContainerId
Type of the resulting commitment
Source§fn consensus_commit(&self) -> Self::Commitment
fn consensus_commit(&self) -> Self::Commitment
Performs commitment to client-side-validated data
Source§fn consensus_verify(&self, commitment: &Self::Commitment) -> bool
fn consensus_verify(&self, commitment: &Self::Commitment) -> bool
Verifies commitment to client-side-validated data
Source§impl Ord for Container
impl Ord for Container
Source§impl PartialOrd for Container
impl PartialOrd for Container
Source§impl Strategy for Container
impl Strategy for Container
Source§type Strategy = UsingStrict
type Strategy = UsingStrict
Specific strategy. List of supported strategies: Read more
Source§impl StrictDecode for Container
impl StrictDecode for Container
Source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given
std::io::Read
instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed
. Use io::Cursor
over the buffer and
StrictDecode::strict_decode
to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path
and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed
if file contains remaining
data after the object reconstruction.Source§impl StrictEncode for Container
impl StrictEncode for Container
Source§fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given
std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.Source§fn strict_serialize(&self) -> Result<Vec<u8>, Error>
fn strict_serialize(&self) -> Result<Vec<u8>, Error>
Serializes data as a byte array using
StrictEncode::strict_encode
functionimpl Eq for Container
impl StructuralPartialEq for Container
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnwindSafe for Container
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