Struct ckb_proposal_table::ProposalView [−][src]
pub struct ProposalView { /* fields omitted */ }Expand description
A view captures point-time proposal set, representing on-chain proposed transaction pool, stored in the memory so that there is no need to fetch on hard disk, create by ProposalTable finalize method w_close and w_far define the closest and farthest on-chain distance between a transaction’s proposal and commitment.
Implementations
impl ProposalView[src]
impl ProposalView[src]pub fn new(
gap: HashSet<ProposalShortId>,
set: HashSet<ProposalShortId>
) -> ProposalView[src]
pub fn new(
gap: HashSet<ProposalShortId>,
set: HashSet<ProposalShortId>
) -> ProposalView[src]Create new ProposalView
pub fn gap(&self) -> &HashSet<ProposalShortId>[src]
pub fn gap(&self) -> &HashSet<ProposalShortId>[src]Return proposals between w_close and tip
pub fn set(&self) -> &HashSet<ProposalShortId>[src]
pub fn set(&self) -> &HashSet<ProposalShortId>[src]Return proposals between w_close and w_far
pub fn contains_proposed(&self, id: &ProposalShortId) -> bool[src]
pub fn contains_proposed(&self, id: &ProposalShortId) -> bool[src]Returns true if the proposals set between w_close and w_far contains the id.
pub fn contains_gap(&self, id: &ProposalShortId) -> bool[src]
pub fn contains_gap(&self, id: &ProposalShortId) -> bool[src]Returns true if the proposals set between w_close and tip contains the id.
Trait Implementations
impl Clone for ProposalView[src]
impl Clone for ProposalView[src]fn clone(&self) -> ProposalView[src]
fn clone(&self) -> ProposalView[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for ProposalView[src]
impl Debug for ProposalView[src]impl Default for ProposalView[src]
impl Default for ProposalView[src]fn default() -> ProposalView[src]
fn default() -> ProposalView[src]Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ProposalView
impl Send for ProposalView
impl Sync for ProposalView
impl Unpin for ProposalView
impl UnwindSafe for ProposalView
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,