Skip to main content

BallotProto

Struct BallotProto 

Source
pub struct BallotProto<'a, 'b, C: Consensus, D: Driver>(pub &'a mut SlotProto<'b, C, D>);

Tuple Fields§

§0: &'a mut SlotProto<'b, C, D>

Implementations§

Source§

impl<'a, 'b, C: Consensus, D: Driver> BallotProto<'a, 'b, C, D>

Source

pub fn is_newer_node_statement( &self, node_id: &SCPNodeID, st: &SCPStatement, ) -> bool

Source

pub fn is_newer_statement(older: &SCPStatement, newer: &SCPStatement) -> bool

Source

pub fn get_statement_values(st: &SCPStatement) -> HashSet<SCPValue>

Source

pub fn should_process_envelope(&self, env: &SCPEnvelope, ours: bool) -> bool

Source

pub fn process_envelope( &mut self, env: &SCPEnvelope, ours: bool, ) -> EnvelopeState

Source

pub fn is_statement_sane(&self, statement: &SCPStatement, ours: bool) -> bool

Source

pub fn abandon_ballot(&mut self, n: u32) -> bool

Source

pub fn bump_state(&mut self, value: SCPValue, force: bool) -> bool

Source

pub fn driver_calling_back(&mut self, cb: DriverCallback)

Source

pub fn timer_expired(&mut self)

Source

pub fn set_state_from_envelope(&mut self, env: &SCPEnvelope)

Source

pub fn process_current_state<F>(&self, f: &mut F, force_self: bool) -> bool
where F: FnMut(&SCPEnvelope) -> bool,

Source

pub fn get_latest_message(&self, id: &SCPNodeID) -> Option<SCPEnvelope>

Source

pub fn get_externalizing_state(&self) -> Vec<SCPEnvelope>

Source

pub fn get_state( &self, n: &SCPNodeID, self_already_moved_on: bool, ) -> QuorumInfoNodeState

Source

pub fn get_json_quorum_info( &self, id: &SCPNodeID, summary: bool, full_keys: bool, ) -> Value

Source

pub fn get_json_info(&self) -> Value

Source

pub fn get_last_message_send(&self) -> Option<SCPEnvelope>

Trait Implementations§

Source§

impl<'a, 'b, C: Debug + Consensus, D: Debug + Driver> Debug for BallotProto<'a, 'b, C, D>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, 'b, C, D> !UnwindSafe for BallotProto<'a, 'b, C, D>

§

impl<'a, 'b, C, D> Forget for BallotProto<'a, 'b, C, D>

§

impl<'a, 'b, C, D> Freeze for BallotProto<'a, 'b, C, D>
where &'a mut SlotProto<'b, C, D>: Freeze,

§

impl<'a, 'b, C, D> Move for BallotProto<'a, 'b, C, D>

§

impl<'a, 'b, C, D> RefUnwindSafe for BallotProto<'a, 'b, C, D>

§

impl<'a, 'b, C, D> Send for BallotProto<'a, 'b, C, D>
where &'b ConsensusDriver<C, D>: Send, &'b LocalState: Send, RawTable<(BytesM<u32::MAX>, ())>: Send, RawTable<(PublicKey, SCPEnvelope)>: Send, BoxRaw<MlDsa65PublicKey>: Send, RawVecInner: Send, BoxRaw<MlDsa65Signature>: Send, RawTable<(PublicKey, ())>: Send,

§

impl<'a, 'b, C, D> Sync for BallotProto<'a, 'b, C, D>
where D: Sync, C: Sync, BoxRaw<MlDsa65PublicKey>: Sync, RawVecInner: Sync, RawTable<(BytesM<u32::MAX>, ())>: Sync, RawTable<(PublicKey, SCPEnvelope)>: Sync, BoxRaw<MlDsa65Signature>: Sync, RawTable<(PublicKey, ())>: Sync,

§

impl<'a, 'b, C, D> Unpin for BallotProto<'a, 'b, C, D>
where &'a mut SlotProto<'b, C, D>: Unpin,

§

impl<'a, 'b, C, D> UnsafeUnpin for BallotProto<'a, 'b, C, D>
where &'a mut SlotProto<'b, C, D>: UnsafeUnpin,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StaticIfNoAlloc for T

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more