pub enum Artifact<S: Scheme, D: Digest> {
Notarize(Notarize<S, D>),
Notarization(Notarization<S, D>),
Certification(Round, bool),
Nullify(Nullify<S>),
Nullification(Nullification<S>),
Finalize(Finalize<S, D>),
Finalization(Finalization<S, D>),
}Expand description
Artifact represents all consensus artifacts (votes and certificates) for storage.
Variants§
Notarize(Notarize<S, D>)
A validator’s notarize vote over a proposal.
Notarization(Notarization<S, D>)
A recovered certificate for a notarization.
Certification(Round, bool)
A notarization was locally certified.
Nullify(Nullify<S>)
A validator’s nullify vote used to skip the current view.
Nullification(Nullification<S>)
A recovered certificate for a nullification.
Finalize(Finalize<S, D>)
A validator’s finalize vote over a proposal.
Finalization(Finalization<S, D>)
A recovered certificate for a finalization.
Trait Implementations§
Source§impl<S: Scheme, D: Digest> EncodeSize for Artifact<S, D>
impl<S: Scheme, D: Digest> EncodeSize for Artifact<S, D>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§fn encode_inline_size(&self) -> usize
fn encode_inline_size(&self) -> usize
Returns the encoded size excluding bytes passed to
BufsMut::push
during Write::write_bufs. Used to size the working buffer for inline
writes. Override alongside Write::write_bufs for types where large
Bytes fields go via push; failing to do so will over-allocate.Source§impl<S: Scheme, D: Digest> From<Certificate<S, D>> for Artifact<S, D>
impl<S: Scheme, D: Digest> From<Certificate<S, D>> for Artifact<S, D>
Source§fn from(cert: Certificate<S, D>) -> Self
fn from(cert: Certificate<S, D>) -> Self
Converts to this type from the input type.
Source§impl<S: Scheme, D: Digest> Read for Artifact<S, D>
impl<S: Scheme, D: Digest> Read for Artifact<S, D>
impl<S: PartialEq + Scheme, D: PartialEq + Digest> StructuralPartialEq for Artifact<S, D>
Source§impl<S: Scheme, D: Digest> Write for Artifact<S, D>
impl<S: Scheme, D: Digest> Write for Artifact<S, D>
Source§fn write_bufs(&self, buf: &mut impl BufsMut)
fn write_bufs(&self, buf: &mut impl BufsMut)
Writes to a
BufsMut, allowing existing Bytes chunks to be
appended via BufsMut::push instead of written inline. Must encode
to the same format as Write::write. Defaults to Write::write.Auto Trait Implementations§
impl<S, D> !Freeze for Artifact<S, D>
impl<S, D> RefUnwindSafe for Artifact<S, D>where
Notarize<S, D>: RefUnwindSafe,
Notarization<S, D>: RefUnwindSafe,
Nullify<S>: RefUnwindSafe,
Nullification<S>: RefUnwindSafe,
Finalize<S, D>: RefUnwindSafe,
Finalization<S, D>: RefUnwindSafe,
impl<S, D> Send for Artifact<S, D>where
Notarize<S, D>: Send,
Notarization<S, D>: Send,
Nullify<S>: Send,
Nullification<S>: Send,
Finalize<S, D>: Send,
Finalization<S, D>: Send,
impl<S, D> Sync for Artifact<S, D>where
Notarize<S, D>: Sync,
Notarization<S, D>: Sync,
Nullify<S>: Sync,
Nullification<S>: Sync,
Finalize<S, D>: Sync,
Finalization<S, D>: Sync,
impl<S, D> Unpin for Artifact<S, D>where
Notarize<S, D>: Unpin,
Notarization<S, D>: Unpin,
Nullify<S>: Unpin,
Nullification<S>: Unpin,
Finalize<S, D>: Unpin,
Finalization<S, D>: Unpin,
impl<S, D> UnsafeUnpin for Artifact<S, D>where
Notarize<S, D>: UnsafeUnpin,
Notarization<S, D>: UnsafeUnpin,
Nullify<S>: UnsafeUnpin,
Nullification<S>: UnsafeUnpin,
Finalize<S, D>: UnsafeUnpin,
Finalization<S, D>: UnsafeUnpin,
impl<S, D> UnwindSafe for Artifact<S, D>where
Notarize<S, D>: UnwindSafe,
Notarization<S, D>: UnwindSafe,
Nullify<S>: UnwindSafe,
Nullification<S>: UnwindSafe,
Finalize<S, D>: UnwindSafe,
Finalization<S, D>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Codec for T
Source§impl<X, U> DecodeRangeExt<X> for U
impl<X, U> DecodeRangeExt<X> for U
Source§fn decode_range(
buf: impl Buf,
range: impl RangeBounds<usize>,
) -> Result<Self, Error>
fn decode_range( buf: impl Buf, range: impl RangeBounds<usize>, ) -> Result<Self, Error>
Decodes a value using only a range configuration. Read more
Source§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> EncodeExt for Twhere
T: EncodeSize + Write,
impl<T> EncodeExt for Twhere
T: EncodeSize + Write,
Source§fn encode_with_pool_mut(&self, pool: &BufferPool) -> IoBufMut
fn encode_with_pool_mut(&self, pool: &BufferPool) -> IoBufMut
Source§fn encode_with_pool(&self, pool: &BufferPool) -> IoBufs
fn encode_with_pool(&self, pool: &BufferPool) -> IoBufs
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<X, U> ReadRangeExt<X> for U
impl<X, U> ReadRangeExt<X> for U
Source§fn read_range(
buf: &mut impl Buf,
range: impl RangeBounds<usize>,
) -> Result<Self, Error>
fn read_range( buf: &mut impl Buf, range: impl RangeBounds<usize>, ) -> Result<Self, Error>
Reads a value using only a range configuration. Read more