Skip to main content

NominationProto

Struct NominationProto 

Source
pub struct NominationProto<'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> NominationProto<'a, 'b, C, D>

Source

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

Source

pub fn is_newer_statement( oldst: &SCPStatementNominate, st: &SCPStatementNominate, ) -> bool

Source

pub fn is_sane(&self, st: &SCPStatement) -> bool

Source

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

Source

pub fn emit_nomination(&mut self)

Source

pub fn accept_predicate(v: &SCPValue, st: &SCPStatement) -> bool

Source

pub fn apply_all<F>(nom: &SCPStatementNominate, processor: F)
where F: FnMut(&SCPValue),

Source

pub fn update_round_leaders(&mut self)

Source

pub fn get_node_priority(&self, node_id: &SCPNodeID, qset: &SCPQuorumSet) -> u64

Source

pub fn get_new_value_from_nomination( &self, nom: &SCPStatementNominate, ) -> Option<SCPValue>

Source

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

Source

pub fn process_envelope(&mut self, envelope: &SCPEnvelope) -> EnvelopeState

Source

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

Source

pub fn nominate( &mut self, value: &SCPValue, previous_value: &SCPValue, timed_out: bool, ) -> bool

Source

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

Source

pub fn stop_nomination(&mut self)

Source

pub fn get_leaders(&self) -> HashSet<SCPNodeID>

Source

pub fn get_json_info(&self) -> Value

Source

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

Source

pub fn set_state_from_envelope(&mut self, envelope: &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, node_id: &SCPNodeID) -> Option<SCPEnvelope>

Source

pub fn get_latest_composite_candidate(&self) -> Option<SCPValue>

Source

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

Source§

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

Trait Implementations§

Source§

impl<'a, 'b, C: Debug + Consensus, D: Debug + Driver> Debug for NominationProto<'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 NominationProto<'a, 'b, C, D>

§

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

§

impl<'a, 'b, C, D> RefUnwindSafe for NominationProto<'a, 'b, C, D>
where &'a mut SlotProto<'b, C, D>: RefUnwindSafe,

§

impl<'a, 'b, C, D> Send for NominationProto<'a, 'b, C, D>
where &'a mut SlotProto<'b, C, D>: Send,

§

impl<'a, 'b, C, D> Sync for NominationProto<'a, 'b, C, D>
where &'a mut SlotProto<'b, C, D>: Sync,

§

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

§

impl<'a, 'b, C, D> UnsafeUnpin for NominationProto<'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