Struct ckb_types::packed::ProposalShortIdVecReader
source · [−]pub struct ProposalShortIdVecReader<'r>(_);
Implementations
sourceimpl<'r> ProposalShortIdVecReader<'r>
impl<'r> ProposalShortIdVecReader<'r>
pub const ITEM_SIZE: usize = 10usize
pub fn total_size(&self) -> usize
pub fn item_count(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, idx: usize) -> Option<ProposalShortIdReader<'r>>
pub fn get_unchecked(&self, idx: usize) -> ProposalShortIdReader<'r>
sourceimpl<'r> ProposalShortIdVecReader<'r>
impl<'r> ProposalShortIdVecReader<'r>
pub fn iter<'t>(&'t self) -> ProposalShortIdVecReaderIterator<'t, 'r>ⓘNotable traits for ProposalShortIdVecReaderIterator<'t, 'r>impl<'t: 'r, 'r> Iterator for ProposalShortIdVecReaderIterator<'t, 'r> type Item = ProposalShortIdReader<'t>;
sourceimpl<'r> ProposalShortIdVecReader<'r>
impl<'r> ProposalShortIdVecReader<'r>
sourcepub fn calc_proposals_hash(&self) -> Byte32
pub fn calc_proposals_hash(&self) -> Byte32
Calculates the hash for proposals.
Returns the empty hash if no proposals short ids, otherwise, calculates a hash for all proposals short ids and return it.
Trait Implementations
sourceimpl<'r> Clone for ProposalShortIdVecReader<'r>
impl<'r> Clone for ProposalShortIdVecReader<'r>
sourcefn clone(&self) -> ProposalShortIdVecReader<'r>
fn clone(&self) -> ProposalShortIdVecReader<'r>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'r> Debug for ProposalShortIdVecReader<'r>
impl<'r> Debug for ProposalShortIdVecReader<'r>
sourceimpl<'r> Display for ProposalShortIdVecReader<'r>
impl<'r> Display for ProposalShortIdVecReader<'r>
sourceimpl<'r> LowerHex for ProposalShortIdVecReader<'r>
impl<'r> LowerHex for ProposalShortIdVecReader<'r>
sourceimpl<'r> Reader<'r> for ProposalShortIdVecReader<'r>
impl<'r> Reader<'r> for ProposalShortIdVecReader<'r>
type Entity = ProposalShortIdVec
const NAME: &'static str = "ProposalShortIdVecReader"
fn to_entity(&self) -> Self::Entity
fn new_unchecked(slice: &'r [u8]) -> Self
fn as_slice(&self) -> &'r [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn verify(slice: &[u8], _compatible: bool) -> VerificationResult<()>
fn from_slice(slice: &'r [u8]) -> Result<Self, VerificationError>
fn from_compatible_slice(slice: &'r [u8]) -> Result<Self, VerificationError>
impl<'r> Copy for ProposalShortIdVecReader<'r>
Auto Trait Implementations
impl<'r> RefUnwindSafe for ProposalShortIdVecReader<'r>
impl<'r> Send for ProposalShortIdVecReader<'r>
impl<'r> Sync for ProposalShortIdVecReader<'r>
impl<'r> Unpin for ProposalShortIdVecReader<'r>
impl<'r> UnwindSafe for ProposalShortIdVecReader<'r>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'r, R> FromSliceShouldBeOk<'r> for R where
R: Reader<'r>,
impl<'r, R> FromSliceShouldBeOk<'r> for R where
R: Reader<'r>,
sourcefn from_slice_should_be_ok(slice: &'r [u8]) -> R
fn from_slice_should_be_ok(slice: &'r [u8]) -> R
Unwraps the result of from_slice(..)
with confidence and we assume that it’s impossible to fail.