pub struct ProposalQueue { /* private fields */ }Available on 32-bit or 64-bit only.
Expand description
Proposal queue that helps filtering and sorting Proposals received during
one epoch. The Proposals are stored in a HashMap which maps Proposal
references to Proposals, such that, given a reference, a proposal can be
accessed efficiently. To enable iteration over the queue in order, the
ProposalQueue also contains a vector of ProposalRefs.
Implementations§
Source§impl ProposalQueue
impl ProposalQueue
Sourcepub fn get(&self, proposal_reference: &ProposalRef) -> Option<&QueuedProposal>
pub fn get(&self, proposal_reference: &ProposalRef) -> Option<&QueuedProposal>
Returns proposal for a given proposal ID
Source§impl ProposalQueue
impl ProposalQueue
Sourcepub fn app_ephemeral_proposals_for_component_id(
&self,
component_id: ComponentId,
) -> impl Iterator<Item = QueuedAppEphemeralProposal<'_>>
Available on crate feature extensions-draft-08 only.
pub fn app_ephemeral_proposals_for_component_id( &self, component_id: ComponentId, ) -> impl Iterator<Item = QueuedAppEphemeralProposal<'_>>
extensions-draft-08 only.Return an iterator over the QueuedAppEphemeralProposals in the proposal queue,
in the order they appear in the commit.
Sourcepub fn unique_component_ids_for_app_ephemeral(&self) -> Vec<ComponentId> ⓘ
Available on crate feature extensions-draft-08 only.
pub fn unique_component_ids_for_app_ephemeral(&self) -> Vec<ComponentId> ⓘ
extensions-draft-08 only.Return the list of all ComponentIds available across all
QueuedAppEphemeralProposals in the proposal queue, ordered by ComponentId.
Trait Implementations§
Source§impl Clone for ProposalQueue
impl Clone for ProposalQueue
Source§fn clone(&self) -> ProposalQueue
fn clone(&self) -> ProposalQueue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProposalQueue
impl Debug for ProposalQueue
Source§impl Default for ProposalQueue
impl Default for ProposalQueue
Source§fn default() -> ProposalQueue
fn default() -> ProposalQueue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProposalQueue
impl<'de> Deserialize<'de> for ProposalQueue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Extend<QueuedProposal> for ProposalQueue
impl Extend<QueuedProposal> for ProposalQueue
Source§fn extend<T: IntoIterator<Item = QueuedProposal>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = QueuedProposal>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<QueuedProposal> for ProposalQueue
impl FromIterator<QueuedProposal> for ProposalQueue
Source§fn from_iter<T: IntoIterator<Item = QueuedProposal>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = QueuedProposal>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<'a> IntoIterator for &'a ProposalQueue
impl<'a> IntoIterator for &'a ProposalQueue
Source§type Item = &'a QueuedProposal
type Item = &'a QueuedProposal
The type of the elements being iterated over.
Source§type IntoIter = Values<'a, HashReference, QueuedProposal>
type IntoIter = Values<'a, HashReference, QueuedProposal>
Which kind of iterator are we turning this into?
Source§impl IntoIterator for ProposalQueue
impl IntoIterator for ProposalQueue
Source§type Item = QueuedProposal
type Item = QueuedProposal
The type of the elements being iterated over.
Source§type IntoIter = IntoValues<HashReference, QueuedProposal>
type IntoIter = IntoValues<HashReference, QueuedProposal>
Which kind of iterator are we turning this into?
Source§impl PartialEq for ProposalQueue
impl PartialEq for ProposalQueue
Source§impl Serialize for ProposalQueue
impl Serialize for ProposalQueue
impl StructuralPartialEq for ProposalQueue
Auto Trait Implementations§
impl Freeze for ProposalQueue
impl RefUnwindSafe for ProposalQueue
impl Send for ProposalQueue
impl Sync for ProposalQueue
impl Unpin for ProposalQueue
impl UnwindSafe for ProposalQueue
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<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
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