Skip to main content

VcState

Struct VcState 

Source
pub struct VcState<const N: usize, const G: usize, const P: usize> {
Show 61 fields pub configured: bool, pub epoch: b32, pub n: b5, pub me: b5, pub q: b5, pub session: b64, pub view: b32, pub rec: [[Record<P>; G]; N], pub sealed_from: b16, pub seal_hi: [b32; N], pub p_view: b32, pub p_open: b16, pub p_busy: bool, pub p_subject: b5, pub p_rec: [Record<P>; G], pub p_j: b4, pub p_sent: bool, pub p_acc: [b64; 4], pub p_have: bool, pub p_sign_out: bool, pub p_signed: bool, pub p_sig: [b64; 8], pub p_key_out: bool, pub p_keyed: bool, pub p_own_given: bool, pub p_shared: bool, pub skip_pending: bool, pub in_skipped: bool, pub late_done: bool, pub prev_open_done: b16, pub dirty: b16, pub tainted: b16, pub sealing: bool, pub seal_sent: bool, pub chain_busy: bool, pub chain_subject: b5, pub chain_j: b4, pub chain_sent: bool, pub chain_acc: [b64; 4], pub hdone: b16, pub hdigest: [[b64; 4]; N], pub opened: b16, pub open_done: b16, pub sign_sent: b16, pub signed: b16, pub hsig: [[b64; 8]; N], pub own_given: b16, pub shared: b16, pub nv_sent: bool, pub clock: b32, pub seal_at: b32, pub nv_deadline: b32, pub installed_next: bool, pub h_ctb: ConsMsg<P>, pub h_dig: VcDigestReq, pub h_sign: VcSignReq, pub h_open: VcKey, pub h_own: VcKey, pub h_share: VcKey, pub h_inst: Install<G, P>, pub refused: b32,
}
Expand description

State.

Fields§

§configured: bool§epoch: b32§n: b5§me: b5§q: b5§session: b64§view: b32§rec: [[Record<P>; G]; N]§sealed_from: b16

SEALVIEW(view) seen from these replicas (a seal of a later view counts: that replica has left this view, R-28).

§seal_hi: [b32; N]

Per replica, one plus the highest view it sealed (0: none). Kept across views so a replica that ran ahead still counts (R-28).

§p_view: b32

R-28: the view we left, for subjects that seal it after we did. Each such subject’s view-p_view history is complete exactly at its own SEALVIEW(p_view) (CTB is FIFO): its records are copied that cycle into p_rec and chained and shared from the copy only.

§p_open: b16§p_busy: bool§p_subject: b5§p_rec: [Record<P>; G]§p_j: b4§p_sent: bool§p_acc: [b64; 4]§p_have: bool§p_sign_out: bool§p_signed: bool§p_sig: [b64; 8]§p_key_out: bool

Our own key and share for the late subject go into our own history collector too (so a late NEWVIEW naming it can be judged here).

§p_keyed: bool§p_own_given: bool§p_shared: bool§skip_pending: bool

R-28 late install: we issued a skip; we entered this view by skip; a late NEWVIEW for it was taken; the previous view’s opened keys.

§in_skipped: bool§late_done: bool§prev_open_done: b16§dirty: b16

R-31: subjects whose records changed since their history digest was taken (set on every record write; cleared when a chain or a late copy starts from the current records).

§tainted: b16

Subjects with a gap in their CTB stream here: never vouched for.

§sealing: bool§seal_sent: bool§chain_busy: bool

History digests: chain progress per subject, and done flags.

§chain_subject: b5§chain_j: b4§chain_sent: bool§chain_acc: [b64; 4]§hdone: b16§hdigest: [[b64; 4]; N]§opened: b16§open_done: b16

The history collector took our key for this view (only then does its status speak for this view, not a previous one).

§sign_sent: b16§signed: b16§hsig: [[b64; 8]; N]§own_given: b16§shared: b16§nv_sent: bool§clock: b32§seal_at: b32§nv_deadline: b32§installed_next: bool

The next view’s NEWVIEW was accepted.

§h_ctb: ConsMsg<P>§h_dig: VcDigestReq§h_sign: VcSignReq§h_open: VcKey§h_own: VcKey§h_share: VcKey§h_inst: Install<G, P>§refused: b32

Implementations§

Source§

impl<const N: usize, const G: usize, const P: usize> VcState<N, G, P>

Source

pub fn idle() -> Self

Trait Implementations§

Source§

impl<const N: usize, const G: usize, const P: usize> Clone for VcState<N, G, P>

Source§

fn clone(&self) -> VcState<N, G, P>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const N: usize, const G: usize, const P: usize> Debug for VcState<N, G, P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const N: usize, const G: usize, const P: usize> Default for VcState<N, G, P>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<const N: usize, const G: usize, const P: usize> Digital for VcState<N, G, P>

Source§

const BITS: usize

Associated constant that gives the total number of bits needed to represent the value.
Source§

fn static_kind() -> Kind

Returns the [Kind] (run time type descriptor) of the value as a static method
Source§

fn bin(self) -> Box<[BitX]>

Returns the binary representation of the value as a vector of [BitX].
Source§

fn dont_care() -> Self

Returns a “don’t care” value for the type.
§

fn bits() -> usize

Returns the number of bits needed to represent the value.
§

fn kind(&self) -> Kind

Returns the [Kind] (run time type descriptor) of the value.
§

fn typed_bits(self) -> TypedBits

Returns the value as a [TypedBits], which includes both the bits and the kind.
§

fn discriminant(self) -> TypedBits

Returns the discriminant of the value as a [TypedBits].
§

fn variant_kind(self) -> Kind

Returns the [Kind] of the variant if the value is an enum with variants.
§

fn binary_string(self) -> String

Returns the binary representation of the value as a string of ‘0’, ‘1’, and ‘X’.
Source§

impl<const N: usize, const G: usize, const P: usize> PartialEq for VcState<N, G, P>

Source§

fn eq(&self, other: &VcState<N, G, P>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const N: usize, const G: usize, const P: usize> Copy for VcState<N, G, P>

Source§

impl<const N: usize, const G: usize, const P: usize> StructuralPartialEq for VcState<N, G, P>

Auto Trait Implementations§

§

impl<const N: usize, const G: usize, const P: usize> Freeze for VcState<N, G, P>

§

impl<const N: usize, const G: usize, const P: usize> RefUnwindSafe for VcState<N, G, P>

§

impl<const N: usize, const G: usize, const P: usize> Send for VcState<N, G, P>

§

impl<const N: usize, const G: usize, const P: usize> Sync for VcState<N, G, P>

§

impl<const N: usize, const G: usize, const P: usize> Unpin for VcState<N, G, P>

§

impl<const N: usize, const G: usize, const P: usize> UnsafeUnpin for VcState<N, G, P>

§

impl<const N: usize, const G: usize, const P: usize> UnwindSafe for VcState<N, G, P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<D> OwoColorize for D

§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either [OwoColorize::fg] or a color-specific method, such as [OwoColorize::green], Read more
§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either [OwoColorize::bg] or a color-specific method, such as [OwoColorize::on_yellow], Read more
§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<I, P, O> SynchronousProbeExt<I, P, O> for I

§

fn synchronous_sample(self) -> SynchronousSample<I>
where I: Iterator<Item = TracedSample<(ClockReset, P), O>>, P: Digital, O: Digital,

Create a probe that samples values from the supplied stream just before a positive edge of the clock
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> Traceable for T
where T: Digital,

§

fn bits(&self) -> usize

Get the number of bits for the stored value
§

fn kind(&self) -> Kind

Get the [Kind] of the stored value
§

fn bin(&self) -> Box<[BitX]>

Get the binary representation of the stored value as a vector of [BitX]
§

fn typed_bits(&self) -> TypedBits

Get the [TypedBits] representation of the stored value
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,