pub struct BlockSignatures { /* private fields */ }Expand description
Represents signatures stored in a block. Since a node writes a block as soon as it has enough signatures, signatures can differ from one node to the other. Signatures frame is pre-allocated, which means that not all signatures may fit. But in theory, it should always contain enough space for all nodes to add their own signature.
Implementations§
Source§impl BlockSignatures
impl BlockSignatures
pub fn new_from_signatures(signatures: Vec<BlockSignature>) -> BlockSignatures
Sourcepub fn empty_signatures_for_nodes(cell: &Cell) -> BlockSignatures
pub fn empty_signatures_for_nodes(cell: &Cell) -> BlockSignatures
Create signatures with pre-allocated space for the number of nodes we have in the cell
pub fn to_frame_for_new_block( &self, operations_size: BlockOperationsSize, ) -> Result<SignaturesFrame<Bytes>, Error>
pub fn to_frame_for_existing_block( &self, header_reader: &Reader<'_>, ) -> Result<SignaturesFrame<Bytes>, Error>
pub fn read_frame<I: FrameReader>(inner: I) -> Result<SignaturesFrame<I>, Error>
pub fn read_frame_from_next_offset<I: FrameReader>( inner: I, next_offset: usize, ) -> Result<SignaturesFrame<I>, Error>
Auto Trait Implementations§
impl Freeze for BlockSignatures
impl RefUnwindSafe for BlockSignatures
impl Send for BlockSignatures
impl Sync for BlockSignatures
impl Unpin for BlockSignatures
impl UnwindSafe for BlockSignatures
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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